Package org.infinispan.functional.impl
Class Params
- java.lang.Object
-
- org.infinispan.functional.impl.Params
-
public final class Params extends Object
Internal class that encapsulates collection of parameters used to tweak functional map operations.Internally, parameters are stored in an array which is indexed by a parameter's
Param.id()
All parameters have default values which are stored in a static array field in
Params
class, which are used to as base collection when adding or overriding parameters.- Since:
- 8.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Params
add(Param<?> p)
Params
addAll(Params ps)
Params
addAll(Param<?>... ps)
Adds all parameters and returns a new parameter collection.boolean
containsAll(Param<?>... ps)
Checks whether all the parameters passed in are already present in the current parameters.static Params
create()
static Params
from(Param<?>... ps)
static Params
fromFlagsBitSet(long flagsBitSet)
<T> Param<T>
get(int index)
Retrieve a param given its identifier.static Params
readObject(ObjectInput input)
long
toFlagsBitSet()
Bridging method between flags and params, provided for efficient checks.String
toString()
static void
writeObject(ObjectOutput output, Params params)
-
-
-
Method Detail
-
containsAll
public boolean containsAll(Param<?>... ps)
Checks whether all the parameters passed in are already present in the current parameters. This method can be used to optimise the decision on whether the parameters collection needs updating at all.
-
addAll
public Params addAll(Param<?>... ps)
Adds all parameters and returns a new parameter collection.
-
get
public <T> Param<T> get(int index)
Retrieve a param given its identifier. Callers are expected to know the exact type of parameter that will be returned. Such assumption is possible because as indicated inParam
implementations will only come from Infinispan itself.
-
toFlagsBitSet
public long toFlagsBitSet()
Bridging method between flags and params, provided for efficient checks.
-
fromFlagsBitSet
public static Params fromFlagsBitSet(long flagsBitSet)
-
create
public static Params create()
-
writeObject
public static void writeObject(ObjectOutput output, Params params) throws IOException
- Throws:
IOException
-
readObject
public static Params readObject(ObjectInput input) throws IOException
- Throws:
IOException
-
-