public class ChronoSphereBranchManagerImpl extends java.lang.Object implements ChronoSphereBranchManager
| Constructor and Description |
|---|
ChronoSphereBranchManagerImpl(org.chronos.chronograph.api.structure.ChronoGraph graph) |
| Modifier and Type | Method and Description |
|---|---|
SphereBranch |
createBranch(java.lang.String branchName)
Creates a new child of the master branch with the given name.
|
SphereBranch |
createBranch(java.lang.String branchName,
long branchingTimestamp)
Creates a new child of the master branch with the given name.
|
SphereBranch |
createBranch(java.lang.String parentName,
java.lang.String newBranchName)
Creates a new child of the given parent branch with the given name.
|
SphereBranch |
createBranch(java.lang.String parentName,
java.lang.String newBranchName,
long branchingTimestamp)
Creates a new child of the given parent branch with the given name.
|
boolean |
existsBranch(java.lang.String branchName)
Checks if a branch with the given name exists or not.
|
SphereBranch |
getBranch(java.lang.String branchName)
Returns the branch with the given name.
|
java.util.Set<SphereBranch> |
getBranches()
Returns the set of all existing branches.
|
java.util.Set<java.lang.String> |
getBranchNames()
Returns the name of all existing branches.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMasterBranchpublic ChronoSphereBranchManagerImpl(org.chronos.chronograph.api.structure.ChronoGraph graph)
public SphereBranch createBranch(java.lang.String branchName)
ChronoSphereBranchManagerThis will use the head revision as the base revision for the new branch.
createBranch in interface ChronoSphereBranchManagerbranchName - The name of the new branch. Must not be null. Must not refer to an already existing
branch. Branch names must be unique.null.ChronoSphereBranchManager.createBranch(String, long),
ChronoSphereBranchManager.createBranch(String, String),
ChronoSphereBranchManager.createBranch(String, String, long)public SphereBranch createBranch(java.lang.String branchName, long branchingTimestamp)
ChronoSphereBranchManagercreateBranch in interface ChronoSphereBranchManagerbranchName - The name of the new branch. Must not be null. Must not refer to an already existing
branch. Branch names must be unique.branchingTimestamp - The timestamp at which to branch away from the master branch. Must not be negative. Must be less than
or equal to the timestamp of the latest commit on the master branch.null.ChronoSphereBranchManager.createBranch(String),
ChronoSphereBranchManager.createBranch(String, String),
ChronoSphereBranchManager.createBranch(String, String, long)public SphereBranch createBranch(java.lang.String parentName, java.lang.String newBranchName)
ChronoSphereBranchManagerThis will use the head revision of the given parent branch as the base revision for the new branch.
createBranch in interface ChronoSphereBranchManagerparentName - The name of the parent branch. Must not be null. Must refer to an existing branch.newBranchName - The name of the new child branch. Must not be null. Must not refere to an already
existing branch. Branch names must be unique.null.ChronoSphereBranchManager.createBranch(String),
ChronoSphereBranchManager.createBranch(String, long),
ChronoSphereBranchManager.createBranch(String, String, long)public SphereBranch createBranch(java.lang.String parentName, java.lang.String newBranchName, long branchingTimestamp)
ChronoSphereBranchManagercreateBranch in interface ChronoSphereBranchManagerparentName - The name of the parent branch. Must not be null. Must refer to an existing branch.newBranchName - The name of the new child branch. Must not be null. Must not refere to an already
existing branch. Branch names must be unique.branchingTimestamp - The timestamp at which to branch away from the parent branch. Must not be negative. Must be less than
or equal to the timestamp of the latest commit on the parent branch.null.ChronoSphereBranchManager.createBranch(String),
ChronoSphereBranchManager.createBranch(String, long),
ChronoSphereBranchManager.createBranch(String, String, long)public boolean existsBranch(java.lang.String branchName)
ChronoSphereBranchManagerexistsBranch in interface ChronoSphereBranchManagerbranchName - The branch name to check. Must not be null.true if there is an existing branch with the given name, otherwise false.public SphereBranch getBranch(java.lang.String branchName)
ChronoSphereBranchManagergetBranch in interface ChronoSphereBranchManagerbranchName - The name of the branch to retrieve. Must not be null. Must refer to an existing branch.null.public java.util.Set<java.lang.String> getBranchNames()
ChronoSphereBranchManagergetBranchNames in interface ChronoSphereBranchManagernull.public java.util.Set<SphereBranch> getBranches()
ChronoSphereBranchManagergetBranches in interface ChronoSphereBranchManagernull.