org.xiruss.snapcm.api
Interface Branch

All Superinterfaces:
RepositoryObject
All Known Implementing Classes:
BranchBase, BranchProxy, NullBranch

public interface Branch
extends RepositoryObject


Method Summary
 void addMutableSnapshot(MutableSnapshot snapshot)
          Adds a mutable snapshot to the branch.
 Snapshot commitSnapshot(MutableSnapshot snapshot)
          Commits a mutable snapshot to the branch and returns the resulting immutable snapshot.
 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 immutable snapshots on the branch, indexed by ID.
 SnapshotMap getSnapshots(long startIndex, long count)
          Get a map of all the immutable snapshots on the branch, indexed by ID.
 
Methods inherited from interface org.xiruss.snapcm.api.RepositoryObject
accept, compareTo, getId, getName, getProperties, getProperty, getPropertyNames, getType, hasProperty, initialize, isNull, setId, setName, setProperty, toString
 

Method Detail

getSnapshots

SnapshotMap getSnapshots()
Get a map of all the immutable snapshots on the branch, indexed by ID.

Returns:

getSnapshots

SnapshotMap getSnapshots(long startIndex,
                         long count)
Get a map of all the immutable snapshots on the branch, indexed by ID.

Returns:

getRepository

Repository getRepository()
Specified by:
getRepository in interface RepositoryObject
Returns:
Repository that owns this branch.

commitSnapshot

Snapshot commitSnapshot(MutableSnapshot snapshot)
                        throws VersionCommitException,
                               SnapshotException
Commits a mutable snapshot to the branch and returns the resulting immutable snapshot. This is an atomic transaction.

Throws:
SnapshotException
VersionCommitException

getInitialSnapshot

Snapshot getInitialSnapshot()
Returns the first immutable snapshot on the branch.


getLatestSnapshot

Snapshot getLatestSnapshot()
Returns the last immutable snapshot on the branch.


getSnapshotCount

long getSnapshotCount()
Returns the number of immutable snapshots on the branch.


getSnapshotIterator

java.util.Iterator getSnapshotIterator()
Returns an iterator over the immutable snapshots on the branch.


addMutableSnapshot

void addMutableSnapshot(MutableSnapshot snapshot)
Adds a mutable snapshot to the branch. Used by the repository. Use Repository.createMutableSnapshot(Branch) to get a new mutable snapshot and add it to a branch.

Parameters:
snapshot -

getMutableSnapshot

MutableSnapshot getMutableSnapshot(java.lang.String objId)
Returns a mutable snapshot with the specified ID, if it exists.

Parameters:
objId -
Returns:
Mutable snapshot with the specified ID or null snapshot.

getMutableSnapshotCount

int getMutableSnapshotCount()
Returns the number of mutable snapshots held by the branch.


getMutableSnapshots

SnapshotMap getMutableSnapshots()
Returns a map of the mutable snapshots on the branch.


getMutableSnapshotIterator

java.util.Iterator getMutableSnapshotIterator()
Returns an iterator over the mutable sandboxes held by the branch.


getSnapshot

Snapshot getSnapshot(java.lang.String objId)
Returns the specified snapshot if it is a snapshot on this branch.

Parameters:
objId - Object ID of the snapshot to get