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 caseReturns if a set contains an elementGet 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 setReturn 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
-
contains
Returns if a set contains an element- Parameters:
key- , the name of the setelement- , the element- Returns:
CompletionStagecontaining a boolean
-