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
Fields -
Constructor Summary
Constructors -
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 caseGet 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
protected final org.infinispan.container.impl.InternalEntryFactory 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
-
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:
CompletionStagecontaining 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:
CompletionStagecontaining 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:
CompletionStagecontaining 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:
CompletionStagecontaining aVoid
-
getAll
Get all the entries specified in the keys collection- Parameters:
keys- , collection of keys to be get- Returns:
CompletionStagecontaining 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:
CompletionStagecontaining aLong
-
set
Create the set with given values- Parameters:
key- , the name of the setvalues- , the elements to be inserted- Returns:
CompletionStagecontaining 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:
CompletionStagethe 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:
CompletionStagecontaining a Listor null if elements null or empty
-