|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xiruss.repository.server.RepositoryObjectBase
org.xiruss.repository.server.BranchBase
public class BranchBase
A linear sequence of snapshots
| Field Summary | |
|---|---|
(package private) static org.apache.log4j.Logger |
logger
|
(package private) java.util.Vector |
snapshotList
|
(package private) SnapshotMap |
snapshotsById
|
(package private) java.util.Set |
snapshotSet
|
| Fields inherited from class org.xiruss.repository.server.RepositoryObjectBase |
|---|
id, name, objectTypeConstant, properties, rep |
| Constructor Summary | |
|---|---|
BranchBase()
|
|
| Method Summary | |
|---|---|
void |
accept(RepositoryVisitor visitor)
|
void |
addMutableSnapshot(MutableSnapshot snapshot)
Adds a mutable snapshot to the branch. |
Snapshot |
commitSnapshot(MutableSnapshot sandbox)
Add the snapshot to the branch, committing any created versions to the repository. |
Snapshot |
getInitialSnapshot()
Returns the first immutable snapshot on the branch. |
Snapshot |
getLatestSnapshot()
Returns the last immutable snapshot on the branch. |
MutableSnapshot |
getMutableSnapshot(java.lang.String objId)
Returns a mutable snapshot with the specified ID, if it exists. |
int |
getMutableSnapshotCount()
Returns the number of mutable snapshots held by the branch. |
java.util.Iterator |
getMutableSnapshotIterator()
Returns an iterator over the mutable sandboxes held by the branch. |
SnapshotMap |
getMutableSnapshots()
Returns a map of the mutable snapshots on the branch. |
Repository |
getRepository()
|
Snapshot |
getSnapshot(java.lang.String objId)
Returns the specified snapshot if it is a snapshot on this branch. |
long |
getSnapshotCount()
Returns the number of immutable snapshots on the branch. |
java.util.Iterator |
getSnapshotIterator()
Returns an iterator over the immutable snapshots on the branch. |
SnapshotMap |
getSnapshots()
Get a map of all the snapshots on the branch, indexed by ID. |
SnapshotMap |
getSnapshots(long startIndex,
long count)
Get a map of all the snapshots on the branch, indexed by ID. |
protected java.util.Set |
getSnapshotSet()
|
void |
initialize(Repository rep,
java.lang.String objId,
java.lang.String branchName)
Initialize the object with the specified object ID and name. |
java.lang.String |
setName(java.lang.String name)
Sets the name of object. |
protected void |
setSnapshotSet(java.util.Set snapshots)
Use by persistence mechanism. |
| Methods inherited from class org.xiruss.repository.server.RepositoryObjectBase |
|---|
compareTo, getId, getName, getProperties, getProperty, getPropertyNames, getType, hasProperty, initialize, isNull, setId, setProperties, setProperty, setRepository, setType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xiruss.snapcm.api.RepositoryObject |
|---|
compareTo, getId, getName, getProperties, getProperty, getPropertyNames, getType, hasProperty, isNull, setId, setProperty, toString |
| Field Detail |
|---|
static org.apache.log4j.Logger logger
java.util.Set snapshotSet
java.util.Vector snapshotList
SnapshotMap snapshotsById
| Constructor Detail |
|---|
public BranchBase()
| Method Detail |
|---|
public void initialize(Repository rep,
java.lang.String objId,
java.lang.String branchName)
throws ObjectMutationException
RepositoryObject
initialize in interface RepositoryObjectinitialize in class RepositoryObjectBaseObjectMutationException - If object already has an assigned ID, indicating
that is has already been constructed.protected void setSnapshotSet(java.util.Set snapshots)
snapshots - protected java.util.Set getSnapshotSet()
public SnapshotMap getSnapshots()
getSnapshots in interface Branch
public SnapshotMap getSnapshots(long startIndex,
long count)
getSnapshots in interface Branchpublic Repository getRepository()
getRepository in interface BranchgetRepository in interface RepositoryObjectgetRepository in class RepositoryObjectBase
public Snapshot commitSnapshot(MutableSnapshot sandbox)
throws VersionCommitException,
SnapshotException
commitSnapshot in interface BranchSnapshotException
VersionCommitExceptionpublic Snapshot getInitialSnapshot()
Branch
getInitialSnapshot in interface Branch
public java.lang.String setName(java.lang.String name)
throws RepositoryException
RepositoryObject
setName in interface RepositoryObjectsetName in class RepositoryObjectBasename -
RepositoryExceptionpublic Snapshot getLatestSnapshot()
Branch
getLatestSnapshot in interface Branchpublic long getSnapshotCount()
Branch
getSnapshotCount in interface Branch
public void accept(RepositoryVisitor visitor)
throws java.lang.Throwable
accept in interface RepositoryObjectaccept in class RepositoryObjectBasejava.lang.Throwablepublic java.util.Iterator getSnapshotIterator()
Branch
getSnapshotIterator in interface Branchpublic void addMutableSnapshot(MutableSnapshot snapshot)
Branch
addMutableSnapshot in interface Branchpublic MutableSnapshot getMutableSnapshot(java.lang.String objId)
Branch
getMutableSnapshot in interface Branchpublic int getMutableSnapshotCount()
Branch
getMutableSnapshotCount in interface Branchpublic SnapshotMap getMutableSnapshots()
Branch
getMutableSnapshots in interface Branchpublic java.util.Iterator getMutableSnapshotIterator()
Branch
getMutableSnapshotIterator in interface Branchpublic Snapshot getSnapshot(java.lang.String objId)
Branch
getSnapshot in interface BranchobjId - Object ID of the snapshot to get
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||