|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.batch.AutoBatchSupport
org.infinispan.tree.TreeStructureSupport
org.infinispan.tree.TreeCacheImpl<K,V>
public class TreeCacheImpl<K,V>
| Field Summary |
|---|
| Fields inherited from class org.infinispan.tree.TreeStructureSupport |
|---|
cache, icc |
| Fields inherited from class org.infinispan.batch.AutoBatchSupport |
|---|
batchContainer |
| Constructor Summary | |
|---|---|
TreeCacheImpl(Cache<?,?> cache)
|
|
| Method Summary | |
|---|---|
void |
clearData(Fqn fqn)
Removes the keys and properties from a named node. |
void |
clearData(Fqn fqn,
Flag... flags)
|
void |
clearData(String fqn)
Convenience method that takes in a String represenation of the Fqn. |
void |
clearData(String fqn,
Flag... flags)
|
boolean |
exists(Fqn fqn,
Flag... flags)
|
boolean |
exists(String f)
Tests if an Fqn exists. |
boolean |
exists(String fqn,
Flag... flags)
|
V |
get(Fqn fqn,
K key)
Convenience method that allows for direct access to the data in a Node. |
V |
get(Fqn fqn,
K key,
Flag... flags)
|
V |
get(String fqn,
K key)
Convenience method that takes a string representation of an Fqn. |
V |
get(String fqn,
K key,
Flag... flags)
|
Cache<?,?> |
getCache()
|
Map<K,V> |
getData(Fqn fqn)
Retrieves a defensively copied data map of the underlying node. |
Map<K,V> |
getData(Fqn fqn,
Flag... flags)
|
Set<K> |
getKeys(Fqn fqn)
Returns a set of attribute keys for the Fqn. |
Set<K> |
getKeys(Fqn fqn,
Flag... flags)
|
Set<K> |
getKeys(String fqn)
Convenience method that takes in a String represenation of the Fqn. |
Set<K> |
getKeys(String fqn,
Flag... flags)
|
Node<K,V> |
getNode(Fqn fqn)
A convenience method to retrieve a node directly from the cache. |
Node<K,V> |
getNode(Fqn fqn,
Flag... flags)
|
Node<K,V> |
getNode(String fqn)
Convenience method that takes a string representation of an Fqn. |
Node<K,V> |
getNode(String fqn,
Flag... flags)
|
Node<K,V> |
getRoot()
Returns the root node of this cache. |
Node<K,V> |
getRoot(Flag... flags)
|
void |
move(Fqn nodeToMoveFqn,
Fqn newParentFqn)
Moves a part of the cache to a different subtree. |
void |
move(Fqn nodeToMove,
Fqn newParent,
Flag... flags)
|
void |
move(String nodeToMove,
String newParent)
Convenience method that takes in string representations of Fqns. |
void |
move(String nodeToMove,
String newParent,
Flag... flags)
|
V |
put(Fqn fqn,
K key,
V value)
Associates the specified value with the specified key for a Node in this cache. |
V |
put(Fqn fqn,
K key,
V value,
Flag... flags)
|
void |
put(Fqn fqn,
Map<? extends K,? extends V> data)
Copies all of the mappings from the specified map to a Node. |
void |
put(Fqn fqn,
Map<? extends K,? extends V> data,
Flag... flags)
|
V |
put(String fqn,
K key,
V value)
Convenience method that takes a string representation of an Fqn. |
V |
put(String fqn,
K key,
V value,
Flag... flags)
|
void |
put(String fqn,
Map<? extends K,? extends V> data)
Convenience method that takes a string representation of an Fqn. |
void |
put(String fqn,
Map<? extends K,? extends V> data,
Flag... flags)
|
V |
remove(Fqn fqn,
K key)
Removes the mapping for this key from a Node. |
V |
remove(Fqn fqn,
K key,
Flag... flags)
|
V |
remove(String fqn,
K key)
Convenience method that takes a string representation of an Fqn. |
V |
remove(String fqn,
K key,
Flag... flags)
|
boolean |
removeNode(Fqn fqn)
Removes a Node indicated by absolute Fqn. |
boolean |
removeNode(Fqn fqn,
Flag... flags)
|
boolean |
removeNode(String fqn)
Convenience method that takes a string representation of an Fqn. |
boolean |
removeNode(String fqn,
Flag... flags)
|
void |
start()
|
void |
stop()
|
String |
toString()
|
| Methods inherited from class org.infinispan.tree.TreeStructureSupport |
|---|
exists, getAtomicMap, isLocked, printTree |
| Methods inherited from class org.infinispan.batch.AutoBatchSupport |
|---|
assertBatchingSupported, endAtomic, startAtomic |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.infinispan.tree.TreeCache |
|---|
exists |
| Constructor Detail |
|---|
public TreeCacheImpl(Cache<?,?> cache)
| Method Detail |
|---|
public Node<K,V> getRoot()
TreeCache
getRoot in interface TreeCache<K,V>public Node<K,V> getRoot(Flag... flags)
getRoot in interface TreeCache<K,V>
public V put(String fqn,
K key,
V value)
TreeCacheTreeCache.put(Fqn, Object,
Object)
put in interface TreeCache<K,V>fqn - String representation of the Fqnkey - key with which the specified value is to be associated.value - value to be associated with the specified key.
null if there was no mapping for key. A
null return can also indicate that the Node previously associated null with the
specified key, if the implementation supports null values.
public V put(String fqn,
K key,
V value,
Flag... flags)
put in interface TreeCache<K,V>
public void put(Fqn fqn,
Map<? extends K,? extends V> data)
TreeCacheNode.
put in interface TreeCache<K,V>fqn - absolute Fqn to the Node to copy the data todata - mappings to copy
public void put(Fqn fqn,
Map<? extends K,? extends V> data,
Flag... flags)
put in interface TreeCache<K,V>
public void put(String fqn,
Map<? extends K,? extends V> data)
TreeCacheTreeCache.put(Fqn,
java.util.Map)
put in interface TreeCache<K,V>fqn - String representation of the Fqndata - data map to insert
public void put(String fqn,
Map<? extends K,? extends V> data,
Flag... flags)
put in interface TreeCache<K,V>
public V remove(Fqn fqn,
K key)
TreeCachenull if the Node contained no mapping for this key.
remove in interface TreeCache<K,V>fqn - absolute Fqn to the Node to be accessed.key - key whose mapping is to be removed from the Node
public V remove(Fqn fqn,
K key,
Flag... flags)
remove in interface TreeCache<K,V>
public V remove(String fqn,
K key)
TreeCacheTreeCache.remove(Fqn,
Object)
remove in interface TreeCache<K,V>fqn - string representation of the Fqn to retrievekey - key to remove
public V remove(String fqn,
K key,
Flag... flags)
remove in interface TreeCache<K,V>public boolean removeNode(Fqn fqn)
TreeCacheNode indicated by absolute Fqn.
removeNode in interface TreeCache<K,V>fqn - Node to remove
public boolean removeNode(Fqn fqn,
Flag... flags)
removeNode in interface TreeCache<K,V>public boolean removeNode(String fqn)
TreeCacheTreeCache.removeNode(Fqn)
removeNode in interface TreeCache<K,V>fqn - string representation of the Fqn to retrieve
public boolean removeNode(String fqn,
Flag... flags)
removeNode in interface TreeCache<K,V>public Node<K,V> getNode(Fqn fqn)
TreeCache
getNode in interface TreeCache<K,V>fqn - fqn of the node to retrieve
public Node<K,V> getNode(Fqn fqn,
Flag... flags)
getNode in interface TreeCache<K,V>public Node<K,V> getNode(String fqn)
TreeCacheTreeCache.getNode(Fqn)
getNode in interface TreeCache<K,V>fqn - string representation of the Fqn to retrieve
public Node<K,V> getNode(String fqn,
Flag... flags)
getNode in interface TreeCache<K,V>
public V get(Fqn fqn,
K key)
TreeCacheNode.
get in interface TreeCache<K,V>fqn - absolute Fqn to the Node to be accessed.key - key under which value is to be retrieved.
Node denoted by specified Fqn.
public V get(Fqn fqn,
K key,
Flag... flags)
get in interface TreeCache<K,V>public boolean exists(String f)
TreeCacheTreeCache.exists(Fqn)
exists in interface TreeCache<K,V>f - string representation of an Fqn
public boolean exists(String fqn,
Flag... flags)
exists in interface TreeCache<K,V>
public boolean exists(Fqn fqn,
Flag... flags)
exists in interface TreeCache<K,V>
public V get(String fqn,
K key)
TreeCacheTreeCache.get(Fqn,
Object)
get in interface TreeCache<K,V>fqn - string representation of the Fqn to retrievekey - key to fetch
public V get(String fqn,
K key,
Flag... flags)
get in interface TreeCache<K,V>
public void move(Fqn nodeToMoveFqn,
Fqn newParentFqn)
throws NodeNotExistsException
TreeCache
/a/b/c
/a/b/d
/a/b/e
Fqn f1 = Fqn.fromString("/a/b/c");
Fqn f2 = Fqn.fromString("/a/b/d");
cache.move(f1, f2);
Will result in:
/a/b/d/c /a/b/eand now
Fqn f3 = Fqn.fromString("/a/b/e");
Fqn f4 = Fqn.fromString("/a");
cache.move(f3, f4);
will result in:
/a/b/d/c /a/eNo-op if the node to be moved is the root node. Note: As of 3.0.0 and when using MVCC locking, more specific behaviour is defined as follows:
move in interface TreeCache<K,V>nodeToMoveFqn - the Fqn of the node to move.newParentFqn - new location under which to attach the node being moved.
NodeNotExistsException - may throw one of these if the target node does not exist or if a different thread
has moved this node elsewhere already.
public void move(Fqn nodeToMove,
Fqn newParent,
Flag... flags)
throws NodeNotExistsException
move in interface TreeCache<K,V>NodeNotExistsException
public void move(String nodeToMove,
String newParent)
throws NodeNotExistsException
TreeCacheTreeCache.move(Fqn, Fqn)
move in interface TreeCache<K,V>NodeNotExistsException
public void move(String nodeToMove,
String newParent,
Flag... flags)
throws NodeNotExistsException
move in interface TreeCache<K,V>NodeNotExistsExceptionpublic Map<K,V> getData(Fqn fqn)
TreeCache
getData in interface TreeCache<K,V>
public Map<K,V> getData(Fqn fqn,
Flag... flags)
getData in interface TreeCache<K,V>public Set<K> getKeys(String fqn)
TreeCacheTreeCache.getKeys(Fqn).
getKeys in interface TreeCache<K,V>
public Set<K> getKeys(String fqn,
Flag... flags)
getKeys in interface TreeCache<K,V>public Set<K> getKeys(Fqn fqn)
TreeCache
getKeys in interface TreeCache<K,V>fqn - name of the node
public Set<K> getKeys(Fqn fqn,
Flag... flags)
getKeys in interface TreeCache<K,V>public void clearData(String fqn)
TreeCacheTreeCache.clearData(Fqn).
clearData in interface TreeCache<K,V>
public void clearData(String fqn,
Flag... flags)
clearData in interface TreeCache<K,V>public void clearData(Fqn fqn)
TreeCache
clearData in interface TreeCache<K,V>fqn - name of the node
public void clearData(Fqn fqn,
Flag... flags)
clearData in interface TreeCache<K,V>
public V put(Fqn fqn,
K key,
V value)
TreeCacheNode in this cache. If the Node
previously contained a mapping for this key, the old value is replaced by the specified value.
put in interface TreeCache<K,V>fqn - absolute Fqn to the Node to be accessed.key - key with which the specified value is to be associated.value - value to be associated with the specified key.
null if there was no mapping for key. A
null return can also indicate that the Node previously associated null with the
specified key, if the implementation supports null values.
public V put(Fqn fqn,
K key,
V value,
Flag... flags)
put in interface TreeCache<K,V>public Cache<?,?> getCache()
getCache in interface TreeCache<K,V>
public void start()
throws CacheException
start in interface LifecycleCacheExceptionpublic void stop()
stop in interface Lifecyclepublic String toString()
toString in class Object
|
Google Analytics | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||