- java.lang.Object
-
- swim.db.PageContext
-
- swim.db.TreeContext
-
- swim.db.Trunk<T>
-
public class Trunk<T extends Tree> extends TreeContext
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
btreeDidDrop(BTree newTree, BTree oldTree, long lower)
void
btreeDidRemove(BTree newTree, BTree oldTree, Value key, Value oldValue)
void
btreeDidTake(BTree newTree, BTree oldTree, long upper)
void
btreeDidUpdate(BTree newTree, BTree oldTree, Value key, Value newValue, Value oldValue)
Chunk
commit(Commit commit)
void
commitAsync(Commit commit)
Database
database()
void
hitPage(Page page)
Value
name()
PageLoader
openPageLoader(boolean isResident)
boolean
pageShouldMerge(Page page)
boolean
pageShouldSplit(Page page)
int
post()
void
qtreeDidMove(QTree newTree, QTree oldTree, Value key, long newX, long newY, Value newValue, long oldX, long oldY, Value oldValue)
void
qtreeDidRemove(QTree newTree, QTree oldTree, Value key, long x, long y, Value oldValue)
void
qtreeDidUpdate(QTree newTree, QTree oldTree, Value key, long x, long y, Value newValue, Value oldValue)
StoreSettings
settings()
void
setTreeDelegate(TreeDelegate treeDelegate)
Stage
stage()
void
streeDidDrop(STree newTree, STree oldTree, long lower)
void
streeDidInsert(STree newTree, STree oldTree, long index, Value id, Value newValue)
void
streeDidRemove(STree newTree, STree oldTree, long index, Value id, Value oldValue)
void
streeDidTake(STree newTree, STree oldTree, long upper)
void
streeDidUpdate(STree newTree, STree oldTree, long index, Value id, Value newValue, Value oldValue)
T
tree()
TreeDelegate
treeDelegate()
void
treeDidChange(Tree newTree, Tree oldTree)
void
treeDidClear(Tree newTree, Tree oldTree)
void
treeDidCommit(Tree newTree, Tree oldTree)
boolean
updateTree(T oldTree, T newTree, long newVersion)
void
utreeDidUpdate(UTree newTree, UTree oldTree, Value newValue, Value oldValue)
long
version()
-
Methods inherited from class swim.db.TreeContext
streeDidMove
-
Methods inherited from class swim.db.PageContext
pageShouldMerge, pageShouldSplit, reduce
-
-
-
-
Method Detail
-
settings
public final StoreSettings settings()
- Overrides:
settings
in classPageContext
-
database
public final Database database()
-
version
public final long version()
-
post
public final int post()
-
name
public final Value name()
-
tree
public final T tree()
-
commitAsync
public void commitAsync(Commit commit)
-
commit
public Chunk commit(Commit commit) throws InterruptedException
- Throws:
InterruptedException
-
treeDelegate
public TreeDelegate treeDelegate()
- Overrides:
treeDelegate
in classTreeContext
-
setTreeDelegate
public void setTreeDelegate(TreeDelegate treeDelegate)
- Overrides:
setTreeDelegate
in classTreeContext
-
stage
public Stage stage()
- Overrides:
stage
in classPageContext
-
pageShouldSplit
public boolean pageShouldSplit(Page page)
- Overrides:
pageShouldSplit
in classPageContext
-
pageShouldMerge
public boolean pageShouldMerge(Page page)
- Overrides:
pageShouldMerge
in classPageContext
-
openPageLoader
public PageLoader openPageLoader(boolean isResident)
- Overrides:
openPageLoader
in classPageContext
-
hitPage
public void hitPage(Page page)
- Overrides:
hitPage
in classPageContext
-
treeDidChange
public void treeDidChange(Tree newTree, Tree oldTree)
- Overrides:
treeDidChange
in classTreeContext
-
treeDidCommit
public void treeDidCommit(Tree newTree, Tree oldTree)
- Overrides:
treeDidCommit
in classTreeContext
-
treeDidClear
public void treeDidClear(Tree newTree, Tree oldTree)
- Overrides:
treeDidClear
in classTreeContext
-
btreeDidUpdate
public void btreeDidUpdate(BTree newTree, BTree oldTree, Value key, Value newValue, Value oldValue)
- Overrides:
btreeDidUpdate
in classTreeContext
-
btreeDidRemove
public void btreeDidRemove(BTree newTree, BTree oldTree, Value key, Value oldValue)
- Overrides:
btreeDidRemove
in classTreeContext
-
btreeDidDrop
public void btreeDidDrop(BTree newTree, BTree oldTree, long lower)
- Overrides:
btreeDidDrop
in classTreeContext
-
btreeDidTake
public void btreeDidTake(BTree newTree, BTree oldTree, long upper)
- Overrides:
btreeDidTake
in classTreeContext
-
qtreeDidUpdate
public void qtreeDidUpdate(QTree newTree, QTree oldTree, Value key, long x, long y, Value newValue, Value oldValue)
- Overrides:
qtreeDidUpdate
in classTreeContext
-
qtreeDidMove
public void qtreeDidMove(QTree newTree, QTree oldTree, Value key, long newX, long newY, Value newValue, long oldX, long oldY, Value oldValue)
- Overrides:
qtreeDidMove
in classTreeContext
-
qtreeDidRemove
public void qtreeDidRemove(QTree newTree, QTree oldTree, Value key, long x, long y, Value oldValue)
- Overrides:
qtreeDidRemove
in classTreeContext
-
streeDidUpdate
public void streeDidUpdate(STree newTree, STree oldTree, long index, Value id, Value newValue, Value oldValue)
- Overrides:
streeDidUpdate
in classTreeContext
-
streeDidInsert
public void streeDidInsert(STree newTree, STree oldTree, long index, Value id, Value newValue)
- Overrides:
streeDidInsert
in classTreeContext
-
streeDidRemove
public void streeDidRemove(STree newTree, STree oldTree, long index, Value id, Value oldValue)
- Overrides:
streeDidRemove
in classTreeContext
-
streeDidDrop
public void streeDidDrop(STree newTree, STree oldTree, long lower)
- Overrides:
streeDidDrop
in classTreeContext
-
streeDidTake
public void streeDidTake(STree newTree, STree oldTree, long upper)
- Overrides:
streeDidTake
in classTreeContext
-
utreeDidUpdate
public void utreeDidUpdate(UTree newTree, UTree oldTree, Value newValue, Value oldValue)
- Overrides:
utreeDidUpdate
in classTreeContext
-
-