|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataContainer
This class defines the functionality needed for node manipulation.
DataContainerImpl
Method Summary | |
---|---|
List<NodeData> |
buildNodeData(List<NodeData> list,
NodeSPI node,
boolean mapSafe)
Prepares a list of NodeData objects for a specified node and all its children. |
Object[] |
createNodes(Fqn fqn)
Traverses the tree to the given Fqn, creating nodes if needed. |
boolean |
evict(Fqn fqn)
Following scenarios define how eviction works. |
void |
evict(Fqn fqn,
boolean recursive)
Evicts the given node. |
boolean |
exists(Fqn fqn)
Tests if an Fqn exists and is valid and not deleted. |
Set<Fqn> |
getInternalFqns()
Returns a Set |
List<Fqn> |
getNodesForEviction(Fqn fqn,
boolean recursive)
Generates a list of nodes for eviction. |
int |
getNumberOfAttributes()
Returns an approximation of the total number of attributes in the cache. |
int |
getNumberOfAttributes(Fqn fqn)
Returns an approximation of the total number of attributes in this sub cache. |
int |
getNumberOfLocksHeld()
Returns the number of read or write locks held across the entire cache. |
int |
getNumberOfNodes()
Returns an approximation of the total number of nodes in the cache. |
NodeSPI |
getRoot()
Deprecated. use Cache.getRoot(); |
boolean |
hasChildren(Fqn fqn)
Returns true if the Fqn exists, is valid and is not deleted, and the node has children. |
boolean |
isResident(Fqn fqn)
|
NodeSPI |
peek(Fqn fqn)
Deprecated. Note that this only supports legacy locking schemes (OL and PL) and will be removed when those schemes are removed. |
NodeSPI |
peek(Fqn fqn,
boolean includeDeletedNodes)
Deprecated. Note that this only supports legacy locking schemes (OL and PL) and will be removed when those schemes are removed. |
NodeSPI |
peek(Fqn fqn,
boolean includeDeletedNodes,
boolean includeInvalidNodes)
Deprecated. Note that this only supports legacy locking schemes (OL and PL) and will be removed when those schemes are removed. |
InternalNode |
peekInternalNode(Fqn f,
boolean includeInvalidNodes)
Similar to peek(Fqn) except that the underlying node is NOT wrapped as a NodeSPI . |
InternalNode[] |
peekInternalNodeAndDirectParent(Fqn fqn,
boolean includeInvalidNodes)
Similar to peekInternalNode(Fqn, boolean) except that the node AND its *direct* parent are retrieved. |
String |
printDetails()
|
void |
registerInternalFqn(Fqn fqn)
Adds the specified Fqn to the list of Fqns to be considered "internal". |
boolean |
removeFromDataStructure(Fqn f,
boolean skipMarkerCheck)
Removes the actual node from the tree data structure. |
void |
setRoot(Object nodeInvocationDelegate)
Sets a new root node |
Method Detail |
---|
@Deprecated NodeSPI getRoot()
void registerInternalFqn(Fqn fqn)
fqn
- fqn to add to list@Deprecated NodeSPI peek(Fqn fqn)
fqn
- Fully qualified name for the corresponding node.
@Deprecated NodeSPI peek(Fqn fqn, boolean includeDeletedNodes)
fqn
- Fqn to findincludeDeletedNodes
- if true, deleted nodes are considered
@Deprecated NodeSPI peek(Fqn fqn, boolean includeDeletedNodes, boolean includeInvalidNodes)
fqn
- Fqn of the node to findincludeDeletedNodes
- if true, deleted nodes are also consideredincludeInvalidNodes
- if true, invalid nodes are also considered
boolean exists(Fqn fqn)
fqn
- the fqn representing the node to test
boolean hasChildren(Fqn fqn)
fqn
- the fqn to test
List<NodeData> buildNodeData(List<NodeData> list, NodeSPI node, boolean mapSafe)
NodeData
objects for a specified node and all its children.
list
- List of NodeData objects, which will be added to.node
- node to recursively add to the listmapSafe
- if true, the node's data map reference is passed to the NodeData instance created. Otherwise, the map is copied.
List<Fqn> getNodesForEviction(Fqn fqn, boolean recursive)
Node.setResident(boolean)
.
fqn
- the node to consider for evictionrecursive
- if recursive, child nodes are also considered
Set<Fqn> getInternalFqns()
BuddyManager.BUDDY_BACKUP_SUBTREE
if buddy replication is
enabled.
null
.int getNumberOfLocksHeld()
int getNumberOfNodes()
int getNumberOfAttributes(Fqn fqn)
int getNumberOfAttributes()
boolean removeFromDataStructure(Fqn f, boolean skipMarkerCheck)
f
- the Fqn of the node to removeskipMarkerCheck
- if true, skips checking the boolean NodeSPI.isDeleted()
flag and deletes the node anyway.
void evict(Fqn fqn, boolean recursive)
boolean evict(Fqn fqn)
Following scenarios define how eviction works. 1. If the given node is a leaf then it is entirely removed from the data structure. The node is marked as invalid. 2. If the given node is a leaf then only the data map is cleared. 3. If the given node is the root node then the cildren nodes are evicted. For each child node 1. or 2. applies
Object[] createNodes(Fqn fqn)
Object[] results = createNode(myFqn);
results[0] // this is a List<NodeSPI> of nodes created in getting to the target node.
results[1] // is a NodeSPI reference to the target node, regardless of whether it was created or just found.
fqn
- fqn to find
InternalNode peekInternalNode(Fqn f, boolean includeInvalidNodes)
peek(Fqn)
except that the underlying node is NOT wrapped as a NodeSPI
.
f
- fqn to peekincludeInvalidNodes
- if true, invalid nodes will be considered as well.
InternalNode[] peekInternalNodeAndDirectParent(Fqn fqn, boolean includeInvalidNodes)
peekInternalNode(Fqn, boolean)
except that the node AND its *direct* parent are retrieved.
fqn
- fqn to findincludeInvalidNodes
- if true, invalid nodes are considered.
void setRoot(Object nodeInvocationDelegate)
nodeInvocationDelegate
- boolean isResident(Fqn fqn)
fqn
- fqn to check
String printDetails()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |