Package org.infinispan.query.backend
Enum IndexModificationStrategy
- java.lang.Object
-
- java.lang.Enum<IndexModificationStrategy>
-
- org.infinispan.query.backend.IndexModificationStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<IndexModificationStrategy>
public enum IndexModificationStrategy extends Enum<IndexModificationStrategy>
Defines for which events the Query Interceptor will generate indexing events.- Since:
- 7.0
- Author:
- Sanne Grinovero <sanne@hibernate.org> (C) 2014 Red Hat Inc.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL
Any event intercepted by the current node will trigger an indexing event (excepting those flagged withFlag.SKIP_INDEXING
.LOCAL_ONLY
Only events generated by the current node will trigger indexing events (excepting those flagged withFlag.SKIP_INDEXING
.MANUAL
Indexing events will not be triggered automatically, still the indexing service will be available.PRIMARY_OWNER
Only events target to the primary owner will trigger indexing of the data
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static IndexModificationStrategy
configuredStrategy(org.hibernate.search.spi.SearchIntegrator searchFactory, Configuration cfg)
For a given configuration, define which IndexModificationStrategy is going to be used.abstract boolean
shouldModifyIndexes(FlagAffectedCommand command, InvocationContext ctx, DistributionManager distributionManager, RpcManager rpcManager, Object key)
static IndexModificationStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static IndexModificationStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MANUAL
public static final IndexModificationStrategy MANUAL
Indexing events will not be triggered automatically, still the indexing service will be available. Suited for example if index updates are controlled explicitly.
-
ALL
public static final IndexModificationStrategy ALL
Any event intercepted by the current node will trigger an indexing event (excepting those flagged withFlag.SKIP_INDEXING
.
-
LOCAL_ONLY
public static final IndexModificationStrategy LOCAL_ONLY
Only events generated by the current node will trigger indexing events (excepting those flagged withFlag.SKIP_INDEXING
.
-
PRIMARY_OWNER
public static final IndexModificationStrategy PRIMARY_OWNER
Only events target to the primary owner will trigger indexing of the data
-
-
Method Detail
-
values
public static IndexModificationStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (IndexModificationStrategy c : IndexModificationStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IndexModificationStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
shouldModifyIndexes
public abstract boolean shouldModifyIndexes(FlagAffectedCommand command, InvocationContext ctx, DistributionManager distributionManager, RpcManager rpcManager, Object key)
-
configuredStrategy
public static IndexModificationStrategy configuredStrategy(org.hibernate.search.spi.SearchIntegrator searchFactory, Configuration cfg)
For a given configuration, define which IndexModificationStrategy is going to be used.- Parameters:
searchFactory
-cfg
-- Returns:
- the appropriate IndexModificationStrategy
-
-