getInternalFqns();
/**
* Returns the number of read or write locks held across the entire cache.
*/
int getNumberOfLocksHeld();
/**
* Returns an approximation of the total number of nodes in the
* cache. Since this method doesn't acquire any locks, the number might be
* incorrect, or the method might even throw a
* ConcurrentModificationException
*/
int getNumberOfNodes();
/**
* Returns an approximation of the total number of attributes in
* this sub cache.
*/
int getNumberOfAttributes(Fqn fqn);
/**
* Returns an approximation of the total number of attributes in
* the cache. Since this method doesn't acquire any locks, the number might
* be incorrect, or the method might even throw a
* ConcurrentModificationException
*
* @return number of attribs
*/
int getNumberOfAttributes();
/**
* Removes the actual node from the tree data structure.
*
* @param f the Fqn of the node to remove
* @param skipMarkerCheck if true, skips checking the boolean {@link org.jboss.cache.NodeSPI#isDeleted()} flag and deletes the node anyway.
* @return Returns true if the node was found and removed, false if not.
*/
boolean removeFromDataStructure(Fqn f, boolean skipMarkerCheck);
/**
* Evicts the given node. If recursive is set to true then all child nodes are recusively evicted.
*/
void evict(Fqn fqn, boolean recursive); // TODO: See if this is still needed here
/**
*
* 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
*
*
* @return true if the FQN is leaf and was removed; false if is an intermediate FQN and only contained data
* is droped.
*/
boolean evict(Fqn fqn); // TODO: See if this is still needed here
/**
* Traverses the tree to the given Fqn, creating nodes if needed. Returns a list of nodes created, as well as a reference to the last node.
*
* E.g.,
*
* 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.
*
*
* @param fqn fqn to find
* @return see above.
*/
Object[] createNodes(Fqn fqn);
/**
* Similar to {@link #peek(Fqn)} except that the underlying node is NOT wrapped as a {@link org.jboss.cache.NodeSPI}.
*
* @param f fqn to peek
* @param includeInvalidNodes if true, invalid nodes will be considered as well.
* @return internal node
*/
InternalNode peekInternalNode(Fqn f, boolean includeInvalidNodes);
/**
* Similar to {@link #peekInternalNode(Fqn, boolean)} except that the node AND its *direct* parent are retrieved.
*
* @param fqn fqn to find
* @param includeInvalidNodes if true, invalid nodes are considered.
* @return an array of InternalNodes, containing 2 elements. Element [0] is the node being peeked, and element [1] is its direct parent.
*/
public InternalNode[] peekInternalNodeAndDirectParent(Fqn fqn, boolean includeInvalidNodes);
/**
* Sets a new root node
*
* @param nodeInvocationDelegate
*/
// TODO: 3.0.0: FIx this so that it can take in a NodeSPI for OL/PL and an InternalNode for MVCC
void setRoot(Object nodeInvocationDelegate);
/**
* @param fqn fqn to check
* @return true if the node exists and is marked as resident, false otherwise.
*/
boolean isResident(Fqn fqn);
/**
* @return a string representation of the contents of the data container
*/
String printDetails();
}