Package com.db4o.internal.btree
Class BTree
- java.lang.Object
-
- com.db4o.internal.Identifiable
-
- com.db4o.internal.PersistentBase
-
- com.db4o.internal.LocalPersistentBase
-
- com.db4o.internal.btree.BTree
-
- All Implemented Interfaces:
BTreeStructureListener
,LinkLengthAware
,Persistent
,TransactionParticipant
public class BTree extends LocalPersistentBase implements TransactionParticipant, BTreeStructureListener
-
-
Field Summary
Fields Modifier and Type Field Description protected Queue4
_processing
-
Fields inherited from class com.db4o.internal.Identifiable
_id, _state
-
-
Constructor Summary
Constructors Constructor Description BTree(Transaction trans, int id, Indexable4 keyHandler)
BTree(Transaction trans, int id, Indexable4 keyHandler, int nodeSize)
BTree(Transaction trans, BTreeConfiguration config, int id, Indexable4 keyHandler)
BTree(Transaction trans, BTreeConfiguration config, int id, Indexable4 keyHandler, int treeNodeSize)
BTree(Transaction trans, BTreeConfiguration config, Indexable4 keyHandler)
-
Method Summary
-
Methods inherited from class com.db4o.internal.LocalPersistentBase
idSystem, readBufferById
-
Methods inherited from class com.db4o.internal.PersistentBase
linkLength, newWriteBuffer, produceReadBuffer, produceWriteBuffer, read, read, write, writeObjectBegin, writeOwnID
-
Methods inherited from class com.db4o.internal.Identifiable
beginProcessing, endProcessing, getID, hashCode, isActive, isDirty, isNew, setID, setStateClean, setStateDeactivated, setStateDirty
-
-
-
-
Field Detail
-
_processing
protected Queue4 _processing
-
-
Constructor Detail
-
BTree
public BTree(Transaction trans, BTreeConfiguration config, int id, Indexable4 keyHandler, int treeNodeSize)
-
BTree
public BTree(Transaction trans, BTreeConfiguration config, Indexable4 keyHandler)
-
BTree
public BTree(Transaction trans, BTreeConfiguration config, int id, Indexable4 keyHandler)
-
BTree
public BTree(Transaction trans, int id, Indexable4 keyHandler)
-
BTree
public BTree(Transaction trans, int id, Indexable4 keyHandler, int nodeSize)
-
-
Method Detail
-
root
public BTreeNode root()
-
nodeSize
public int nodeSize()
-
add
public void add(Transaction trans, java.lang.Object key)
-
add
public void add(Transaction trans, PreparedComparison preparedComparison, java.lang.Object key)
-
remove
public java.lang.Object remove(Transaction trans, java.lang.Object key)
-
searchRange
public BTreeRange searchRange(Transaction trans, java.lang.Object key)
-
searchPointer
public BTreePointer searchPointer(Transaction trans, java.lang.Object key)
-
search
public java.lang.Object search(Transaction trans, java.lang.Object key)
-
keyHandler
public Indexable4 keyHandler()
-
searchLeafByObject
public BTreeNodeSearchResult searchLeafByObject(Transaction trans, java.lang.Object key, SearchTarget target)
-
searchLeaf
public BTreeNodeSearchResult searchLeaf(Transaction trans, PreparedComparison preparedComparison, SearchTarget target)
-
commit
public void commit(Transaction transaction)
- Specified by:
commit
in interfaceTransactionParticipant
-
rollback
public void rollback(Transaction trans)
- Specified by:
rollback
in interfaceTransactionParticipant
-
canEnlistWithTransaction
protected boolean canEnlistWithTransaction()
-
getIdentifier
public byte getIdentifier()
- Specified by:
getIdentifier
in interfacePersistent
-
setRemoveListener
public void setRemoveListener(Visitor4 vis)
-
ownLength
public int ownLength()
- Specified by:
ownLength
in interfacePersistent
-
produceNode
public BTreeNode produceNode(int id)
-
readThis
public void readThis(Transaction a_trans, ByteArrayBuffer a_reader)
- Specified by:
readThis
in interfacePersistent
-
writeThis
public void writeThis(Transaction trans, ByteArrayBuffer a_writer)
- Specified by:
writeThis
in interfacePersistent
-
size
public int size(Transaction trans)
-
traverseKeys
public void traverseKeys(Transaction trans, Visitor4 visitor)
-
sizeChanged
public void sizeChanged(Transaction transaction, BTreeNode node, int changeBy)
-
dispose
public void dispose(Transaction transaction)
- Specified by:
dispose
in interfaceTransactionParticipant
-
firstPointer
public BTreePointer firstPointer(Transaction trans)
-
lastPointer
public BTreePointer lastPointer(Transaction trans)
-
debugLoadFully
public BTree debugLoadFully(Transaction trans)
-
defragIndex
public void defragIndex(DefragmentContextImpl context)
-
defragIndexNode
public void defragIndexNode(DefragmentContextImpl context)
-
defragBTree
public void defragBTree(DefragmentServices services)
-
free
public void free(LocalTransaction systemTrans)
- Overrides:
free
in classPersistentBase
-
allNodeIds
public Iterator4 allNodeIds(Transaction systemTrans)
-
asRange
public BTreeRange asRange(Transaction trans)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
structureListener
public void structureListener(BTreeStructureListener listener)
-
notifySplit
public void notifySplit(Transaction trans, BTreeNode originalNode, BTreeNode newRightNode)
- Specified by:
notifySplit
in interfaceBTreeStructureListener
-
notifyDeleted
public void notifyDeleted(Transaction trans, BTreeNode node)
- Specified by:
notifyDeleted
in interfaceBTreeStructureListener
-
notifyCountChanged
public void notifyCountChanged(Transaction trans, BTreeNode node, int diff)
- Specified by:
notifyCountChanged
in interfaceBTreeStructureListener
-
iterator
public Iterator4 iterator(Transaction trans)
-
clear
public void clear(Transaction transaction)
-
nodeCache
public Cache4<java.lang.Integer,BTreeNodeCacheEntry> nodeCache()
-
slotChangeFactory
public SlotChangeFactory slotChangeFactory()
- Overrides:
slotChangeFactory
in classPersistentBase
-
evictedFromCache
public void evictedFromCache(BTreeNode node)
-
convertCacheEvictedNodesToReadMode
public void convertCacheEvictedNodesToReadMode()
-
-