Package akka.util
Class SubclassifiedIndex<K,V>
- java.lang.Object
-
- akka.util.SubclassifiedIndex<K,V>
-
- Direct Known Subclasses:
SubclassifiedIndex.Nonroot
public class SubclassifiedIndex<K,V> extends java.lang.Object
Add key to this index which inherits its value set from the most specific super-class which is known.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubclassifiedIndex.Nonroot<K,V>
-
Constructor Summary
Constructors Constructor Description SubclassifiedIndex(Subclassification<K> sc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>>
addKey(K key)
Add key to this index which inherits its value set from the most specific super-class which is known.scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>>
addValue(K key, V value)
Add value to all keys which are subclasses of the given key.static <K,V>
scala.collection.immutable.Map<K,scala.collection.immutable.Set<V>>emptyMergeMap()
protected scala.collection.immutable.Set<K>
findSubKeysExcept(K key, scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> except)
Find all subkeys of a given key in the index excluding some subkeys.protected scala.collection.immutable.Set<V>
findValues(K key)
Find all values for a given key in the index.protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>>
innerAddKey(K key)
protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>>
innerAddValue(K key, V value)
protected scala.collection.immutable.Set<K>
innerFindSubKeys(K key, scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> except)
protected scala.collection.immutable.Set<V>
innerFindValues(K key)
protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>>
innerRemoveValue(K key, V value)
scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>>
removeValue(K key, V value)
Remove value from all keys which are subclasses of the given key.scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>>
removeValue(V value)
Remove value from all keys in the index.protected SubclassifiedIndex<K,V>
root()
protected scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>>
subkeys()
protected void
subkeys_$eq(scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> x$1)
java.lang.String
toString()
protected scala.collection.immutable.Set<V>
values()
protected void
values_$eq(scala.collection.immutable.Set<V> x$1)
-
-
-
Constructor Detail
-
SubclassifiedIndex
public SubclassifiedIndex(Subclassification<K> sc)
-
-
Method Detail
-
emptyMergeMap
public static <K,V> scala.collection.immutable.Map<K,scala.collection.immutable.Set<V>> emptyMergeMap()
-
values
protected scala.collection.immutable.Set<V> values()
-
values_$eq
protected void values_$eq(scala.collection.immutable.Set<V> x$1)
-
subkeys
protected scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> subkeys()
-
subkeys_$eq
protected void subkeys_$eq(scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> x$1)
-
root
protected SubclassifiedIndex<K,V> root()
-
addKey
public scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> addKey(K key)
Add key to this index which inherits its value set from the most specific super-class which is known.- Parameters:
key
- (undocumented)- Returns:
- the diff that should be added to the cache
-
innerAddKey
protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> innerAddKey(K key)
-
addValue
public scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> addValue(K key, V value)
Add value to all keys which are subclasses of the given key. If the key is not known yet, it is inserted as if using addKey.- Parameters:
key
- (undocumented)value
- (undocumented)- Returns:
- the diff that should be added to the cache
-
innerAddValue
protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> innerAddValue(K key, V value)
-
removeValue
public scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> removeValue(K key, V value)
Remove value from all keys which are subclasses of the given key.- Parameters:
key
- (undocumented)value
- (undocumented)- Returns:
- the complete changes that should be updated in the cache
-
innerRemoveValue
protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> innerRemoveValue(K key, V value)
-
removeValue
public scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> removeValue(V value)
Remove value from all keys in the index.- Parameters:
value
- (undocumented)- Returns:
- the diff that should be removed from the cache
-
findValues
protected final scala.collection.immutable.Set<V> findValues(K key)
Find all values for a given key in the index.- Parameters:
key
- (undocumented)- Returns:
- (undocumented)
-
findSubKeysExcept
protected final scala.collection.immutable.Set<K> findSubKeysExcept(K key, scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> except)
Find all subkeys of a given key in the index excluding some subkeys.- Parameters:
key
- (undocumented)except
- (undocumented)- Returns:
- (undocumented)
-
innerFindSubKeys
protected scala.collection.immutable.Set<K> innerFindSubKeys(K key, scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> except)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-