- java.lang.Object
-
- swim.db.Database
-
public class Database extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
close()
Trunk<Tree>
closeTrunk(Value name)
Chunk
commit(Commit commit)
void
commitAsync(Commit commit)
Chunk
commitChunk(Commit commit, int zone, long base)
DatabaseDelegate
databaseDelegate()
void
databaseDidCloseTrunk(Trunk<?> trunk)
void
databaseDidCreateTrunk(Trunk<?> trunk)
void
databaseDidOpenTrunk(Trunk<?> trunk)
void
databaseDidUpdateTrunk(Trunk<?> trunk, Tree newTree, Tree oldTree, long newVersion)
protected void
didClose()
Lifecycle callback invoked upon entering the closed state.protected void
didOpen()
Lifecycle callback invoked upon entering the opened state.long
diffSize()
Germ
germ()
boolean
isCompacting()
Iterator<MetaLeaf>
leafs()
protected void
onClose()
Lifecycle callback invoked to actually close the database.protected void
onOpen()
Lifecycle callback invoked to actually open the database.boolean
open()
BTreeMap
openBTreeMap(String name)
BTreeMap
openBTreeMap(Value name)
BTreeMap
openBTreeMap(Value name, boolean isResident, boolean isTransient)
Trunk<BTree>
openBTreeTrunk(Value name, boolean isResident, boolean isTransient)
<S> QTreeMap<S>
openQTreeMap(String name, Z2Form<S> shapeForm)
<S> QTreeMap<S>
openQTreeMap(Value name, Z2Form<S> shapeForm)
<S> QTreeMap<S>
openQTreeMap(Value name, Z2Form<S> shapeForm, boolean isResident, boolean isTransient)
Trunk<QTree>
openQTreeTrunk(Value name, boolean isResident, boolean isTransient)
STreeList
openSTreeList(String name)
STreeList
openSTreeList(Value name)
STreeList
openSTreeList(Value name, boolean isResident, boolean isTransient)
Trunk<STree>
openSTreeTrunk(Value name, boolean isResident, boolean isTransient)
<T extends Tree>
Trunk<T>openTrunk(Value name, TreeType treeType, boolean isResident, boolean isTransient)
UTreeValue
openUTreeValue(String name)
UTreeValue
openUTreeValue(Value name)
int
post()
void
removeTree(Value name)
void
setDatabaseDelegate(DatabaseDelegate delegate)
StoreSettings
settings()
void
shiftZone()
Stage
stage()
int
stem()
Store
store()
long
treeCount()
Iterator<MetaTree>
trees()
long
treeSize()
int
trunkCount()
void
uncommit(long version)
long
version()
protected void
willClose()
Lifecycle callback invoked upon entering the closing state.protected void
willOpen()
Lifecycle callback invoked upon entering the opening state.
-
-
-
Method Detail
-
store
public Store store()
-
settings
public StoreSettings settings()
-
stage
public Stage stage()
-
databaseDelegate
public DatabaseDelegate databaseDelegate()
-
setDatabaseDelegate
public void setDatabaseDelegate(DatabaseDelegate delegate)
-
germ
public Germ germ()
-
stem
public int stem()
-
post
public int post()
-
version
public long version()
-
diffSize
public long diffSize()
-
treeSize
public long treeSize()
-
treeCount
public long treeCount()
-
trunkCount
public int trunkCount()
-
isCompacting
public boolean isCompacting()
-
open
public boolean open()
-
willOpen
protected void willOpen()
Lifecycle callback invoked upon entering the opening state.
-
onOpen
protected void onOpen()
Lifecycle callback invoked to actually open the database.
-
didOpen
protected void didOpen()
Lifecycle callback invoked upon entering the opened state.
-
close
public boolean close()
-
willClose
protected void willClose()
Lifecycle callback invoked upon entering the closing state.
-
onClose
protected void onClose()
Lifecycle callback invoked to actually close the database.
-
didClose
protected void didClose()
Lifecycle callback invoked upon entering the closed state.
-
openTrunk
public <T extends Tree> Trunk<T> openTrunk(Value name, TreeType treeType, boolean isResident, boolean isTransient)
-
openBTreeTrunk
public Trunk<BTree> openBTreeTrunk(Value name, boolean isResident, boolean isTransient)
-
openQTreeTrunk
public Trunk<QTree> openQTreeTrunk(Value name, boolean isResident, boolean isTransient)
-
openQTreeMap
public <S> QTreeMap<S> openQTreeMap(Value name, Z2Form<S> shapeForm, boolean isResident, boolean isTransient)
-
openSTreeTrunk
public Trunk<STree> openSTreeTrunk(Value name, boolean isResident, boolean isTransient)
-
openUTreeValue
public UTreeValue openUTreeValue(Value name)
-
openUTreeValue
public UTreeValue openUTreeValue(String name)
-
removeTree
public void removeTree(Value name)
-
commitAsync
public void commitAsync(Commit commit)
-
commit
public Chunk commit(Commit commit) throws InterruptedException
- Throws:
InterruptedException
-
shiftZone
public void shiftZone()
-
uncommit
public void uncommit(long version)
-
databaseDidCreateTrunk
public void databaseDidCreateTrunk(Trunk<?> trunk)
-
databaseDidOpenTrunk
public void databaseDidOpenTrunk(Trunk<?> trunk)
-
databaseDidUpdateTrunk
public void databaseDidUpdateTrunk(Trunk<?> trunk, Tree newTree, Tree oldTree, long newVersion)
-
databaseDidCloseTrunk
public void databaseDidCloseTrunk(Trunk<?> trunk)
-
-