Interface CDOBranch
- All Superinterfaces:
CDOBranchPoint
,CDOBranchProvider
,CDONameProvider
,CDOTimeProvider
,Comparable<CDOBranch>
,IAdaptable
,org.eclipse.net4j.util.container.IContainer<CDOBranch>
,org.eclipse.net4j.util.event.INotifier
- All Known Subinterfaces:
InternalCDOBranch
public interface CDOBranch
extends CDOBranchPoint, CDONameProvider, org.eclipse.net4j.util.container.IContainer<CDOBranch>, Comparable<CDOBranch>, IAdaptable
Represents a stream of changes that is isolated from other streams of changes.
A branch starts at a fixed base
point and ends at a floating head
point.
Between these two points there can be a number of other branch points
:
-
Commit infos
are points in a branch that represent commit operations. -
Branch tags
are named points in a branch. -
Base points
of sub branches of a branch.
- Since:
- 3.0
- Author:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Anevent
fired from abranch
when it gets deleted.Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
org.eclipse.net4j.util.container.IContainer.Modifiable<E extends Object>, org.eclipse.net4j.util.container.IContainer.Persistable<E extends Object>, org.eclipse.net4j.util.container.IContainer.Persistence<E extends Object>
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The fixed ID of themain branch
.static final String
The fixed name of themain branch
.static final String
The string used to separate the segments of branch paths.Fields inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchPoint
INVALID_DATE, UNSPECIFIED_DATE
-
Method Summary
Modifier and TypeMethodDescriptioncreateBranch
(String name) Creates a sub branch of this branch with the given name,based
at thecurrent time
.createBranch
(String name, long timeStamp) Creates a sub branch of this branch with the given name,based
at thebranch point
in this branch with the given time stamp.delete
(org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Deletes this branch and all its sub branches.void
getBase()
Returns the immutable base branch point of this branch, the point in the parent branch that marks the creation of this branch.Returns an array of thebase
branch points starting from the base of themain branch
down to and including the base of this branch.Returns the sub branch of this branch with the given relative path, ornull
if no sub branch with this path exists in this branch.Returns an array of the sub branches of this branch, nevernull
.Returns the branch manager that manages this branch, nevernull
.getHead()
Returns the floating end point of this branch, a pair of this branch and the fixed special time stampunspecified
.int
getID()
Returns the ID of this branch.getName()
Returns the name of this branch as specified when it was created withcreateBranch()
orMAIN_BRANCH_NAME
if this branch is themain branch
.Returns the fully qualified path name of this branch, a concatenation of the names of all branches from themain branch
to this branch, separated byslashes
("/" characters).getPoint
(long timeStamp) Returns the branch point in this branch with the given time stamp.getVersion
(int version) Returns the branch version in this branch with the given version number.boolean
Returnstrue
if this branch has is deleted,false
otherwise.boolean
isLocal()
Returnstrue
if this branch is a local branch,false
otherwise.boolean
void
Deprecated.void
Methods inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchPoint
getBranch, getTimeStamp
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
Methods inherited from interface org.eclipse.net4j.util.container.IContainer
getElements, isEmpty
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Field Details
-
MAIN_BRANCH_ID
static final int MAIN_BRANCH_IDThe fixed ID of themain branch
.- See Also:
-
MAIN_BRANCH_NAME
The fixed name of themain branch
.- See Also:
-
PATH_SEPARATOR
The string used to separate the segments of branch paths.
-
-
Method Details
-
isMainBranch
boolean isMainBranch() -
isLocal
boolean isLocal() -
isDeleted
boolean isDeleted()Returnstrue
if this branch has is deleted,false
otherwise.- Since:
- 4.15
-
getID
int getID()Returns the ID of this branch.The
main branch
has the fixed ID 0 (zero),Local branches
have negative IDs and normal branches have positive IDs. -
getName
Returns the name of this branch as specified when it was created withcreateBranch()
orMAIN_BRANCH_NAME
if this branch is themain branch
.- Specified by:
getName
in interfaceCDONameProvider
- Throws:
CDOBranchDoesNotExistException
-
setName
- Throws:
CDODuplicateBranchException
- Since:
- 4.4
-
getPathName
String getPathName()Returns the fully qualified path name of this branch, a concatenation of the names of all branches from themain branch
to this branch, separated byslashes
("/" characters). Example: "MAIN/team1/smith". -
getBasePath
CDOBranchPoint[] getBasePath()Returns an array of thebase
branch points starting from the base of themain branch
down to and including the base of this branch. -
getBase
Returns the immutable base branch point of this branch, the point in the parent branch that marks the creation of this branch.The base of the
main branch
marks the creation of therepository
.- Throws:
CDOBranchDoesNotExistException
- See Also:
-
getHead
CDOBranchPoint getHead()Returns the floating end point of this branch, a pair of this branch and the fixed special time stampunspecified
.- See Also:
-
getPoint
Returns the branch point in this branch with the given time stamp.This factory method never returns
null
.- See Also:
-
getVersion
Returns the branch version in this branch with the given version number.This factory method never returns
null
.- See Also:
-
getBranchManager
CDOBranchManager getBranchManager()Returns the branch manager that manages this branch, nevernull
. -
getBranches
CDOBranch[] getBranches()Returns an array of the sub branches of this branch, nevernull
. -
getBranch
Returns the sub branch of this branch with the given relative path, ornull
if no sub branch with this path exists in this branch.The path name is the concatenation of the names of all branches from a direct sub branch of this branch, separated by
slashes
("/" characters). Example: "team1/smith". -
createBranch
Creates a sub branch of this branch with the given name,based
at thebranch point
in this branch with the given time stamp.- Parameters:
name
- The name of the sub branch to be created. It must not contain thepath separator
character (slash).timeStamp
- The time stamp in this branch that the sub branch to be created is supposed to bebased at
. It must not be before the base time stamp of this branch and it must be different from the fixed special time stampunspecified
- Throws:
CDODuplicateBranchException
- See Also:
-
createBranch
Creates a sub branch of this branch with the given name,based
at thecurrent time
.- Throws:
CDODuplicateBranchException
-
delete
Deletes this branch and all its sub branches.- Returns:
- an array of the ids of all deleted branches in top-down order.
- Since:
- 4.15
-
fireDeletedEvent
void fireDeletedEvent()- Since:
- 4.15
-
rename
Deprecated.As of 4.4 usesetName(String)
.Renames this branch with the given new name.- Since:
- 4.3
-
setName(String)
.