public interface VBranch
VDatabase
.Modifier and Type | Method and Description |
---|---|
long |
commit()
Commit objects that have been added or changed in this branch
to the database
|
VCollection |
getCollection(java.lang.String name)
Gets or creates a database collection.
|
long |
getHead() |
VLargeCollection |
getLargeCollection(java.lang.String name)
Gets or creates a database collection that can handle large
objects (BLOBs).
|
void |
rollback()
Resets this branch (i.e. discards all changes made since
the branch has been checked out or since the last commit)
|
long getHead()
VCollection getCollection(java.lang.String name)
Gets or creates a database collection. Collections have no special meaning, they are just used to group objects.
The collection's state depends on the branch currently checkout out.
name
- the collection's nameVLargeCollection getLargeCollection(java.lang.String name)
name
- the collection's namelong commit()
VException
- if the branch is named and the branch's head
could not be updated in the database, because it already has been
updated somewhere else (most likely in another thread). If this
happens, the commit has already been fully performed and
getHead()
will return the new CID. The caller then has the
chance to call VDatabase.createBranch(String, long)
to
create a new named branch based on this CID.void rollback()