Package org.infinispan.multimap.impl
Class EmbeddedSetCache<K,V>
java.lang.Object
org.infinispan.multimap.impl.EmbeddedSetCache<K,V>
SetCache with Set methods implementation
- Since:
- 15.0
- Author:
- Vittorio Rigamonti
-
Field Summary
Modifier and TypeFieldDescriptionprotected final AdvancedCache
<K, SetBucket<V>> protected final InternalEntryFactory
static final String
static final String
protected final FunctionalMap.ReadWriteMap
<K, SetBucket<V>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(K key, Collection<V> values) Add the specified elements to the set, creates the set in caseAdd the specified element to the set, creates the set in caseCheck whether the given set exists.Get the entry by key and return it as a setGet all the entries specified in the keys collectionGet the entry by key and return it as a setReturns a list L of 0/1.Return a collection representign a subset of the setremove
(K key, Collection<V> values) Remove the specified elements from the set, remove the set if emptyRemove the specified element to the set, removes the set if emptyset
(K key, Collection<V> values) Create the set with given valuesReturns the number of elements in the set.
-
Field Details
-
ERR_KEY_CAN_T_BE_NULL
- See Also:
-
ERR_VALUE_CAN_T_BE_NULL
- See Also:
-
readWriteMap
-
cache
-
entryFactory
-
-
Constructor Details
-
EmbeddedSetCache
-
-
Method Details
-
get
Get the entry by key and return it as a set- Parameters:
key
- , the name of the set- Returns:
- the set with values if such exist, or null if the key is not present
-
getAsSet
Get the entry by key and return it as a set- Parameters:
key
- , the name of the set- Returns:
- the set with values if such exist, or null if the key is not present
-
exists
Check whether the given set exists.- Parameters:
key
- : The name of the set.- Returns:
true
, if it exists,false
, otherwise.
-
add
Add the specified element to the set, creates the set in case- Parameters:
key
- , the name of the setvalue
- , the element to be inserted- Returns:
CompletionStage
containing aVoid
-
add
Add the specified elements to the set, creates the set in case- Parameters:
key
- , the name of the setvalue
- , the element to be inserted- Returns:
CompletionStage
containing aVoid
-
remove
Remove the specified element to the set, removes the set if empty- Parameters:
key
- , the name of the setvalue
- , the element to be inserted- Returns:
CompletionStage
containing aVoid
-
remove
Remove the specified elements from the set, remove the set if empty- Parameters:
key
- , the name of the setvalue
- , the element to be inserted- Returns:
CompletionStage
containing aVoid
-
getAll
Get all the entries specified in the keys collection- Parameters:
keys
- , collection of keys to be get- Returns:
CompletionStage
containing a invalid input: '{@link /*missing*/}'
-
size
Returns the number of elements in the set. If the entry does not exit, returns size 0.- Parameters:
key
- , the name of the set- Returns:
CompletionStage
containing aLong
-
set
Create the set with given values- Parameters:
key
- , the name of the setvalues
- , the elements to be inserted- Returns:
CompletionStage
containing the number of elements
-
pop
Return a collection representign a subset of the set- Parameters:
key
- , the name of the setcount
- , the number of elements to return- Returns:
CompletionStage
the random subset elements
-
mIsMember
Returns a list L of 0/1. L(i) = 1 if the set contains elements(i)- Parameters:
key
- , the name of the setelements
- , list of elements- Returns:
CompletionStage
containing a Listor null if elements null or empty
-