Package com.hazelcast.config
Enum MetadataPolicy
- java.lang.Object
-
- java.lang.Enum<MetadataPolicy>
-
- com.hazelcast.config.MetadataPolicy
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MetadataPolicy>
public enum MetadataPolicy extends java.lang.Enum<MetadataPolicy>
Hazelcast may process objects of supported types ahead of time to create additional metadata about them. This metadata then is used to make querying and indexing faster.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CREATE_ON_UPDATE
Hazelcast processes supported objects at the time of creation and updates.OFF
Turns off metadata creation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MetadataPolicy
getById(int id)
Returns the MetadataPolicy for the given ID.int
getId()
Returns enumeration id of this policy.static MetadataPolicy
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MetadataPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CREATE_ON_UPDATE
public static final MetadataPolicy CREATE_ON_UPDATE
Hazelcast processes supported objects at the time of creation and updates. This may increase put latency for the specific data structure that this option is configured with.
-
OFF
public static final MetadataPolicy OFF
Turns off metadata creation.
-
-
Method Detail
-
values
public static MetadataPolicy[] 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 (MetadataPolicy c : MetadataPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MetadataPolicy valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getId
public int getId()
Returns enumeration id of this policy. We use id field instead ofEnum.ordinal()
because this value is used in client protocol. The ids for the known policies must not be changed.- Returns:
- id
-
getById
public static MetadataPolicy getById(int id)
Returns the MetadataPolicy for the given ID.- Returns:
- the MetadataPolicy found or null if not found
-
-