Package org.togglz.hazelcast
Class HazelcastStateRepository
java.lang.Object
org.togglz.hazelcast.HazelcastStateRepository
- All Implemented Interfaces:
StateRepository
A state repository which stores the feature state in a Hazelcast distributed map.
The class provides a builder which can be used to configure the Hazelcast instance and map to be used:
StateRepository repository = HazelcastStateRepository.newBuilder().mapName("my_map")
.config(hazelcastConfig).build();
- Author:
- Camiel de Vleeschauwer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.hazelcast.client.config.ClientConfigprotected final com.hazelcast.config.Configprotected final com.hazelcast.core.HazelcastInstanceprotected final String -
Constructor Summary
ConstructorsConstructorDescriptionHazelcastStateRepository(com.hazelcast.client.config.ClientConfig hazelcastClientConfig, String mapName) HazelcastStateRepository(com.hazelcast.config.Config hazelcastConfig, String mapName) HazelcastStateRepository(com.hazelcast.core.HazelcastInstance hazelcastInstance, String mapName) -
Method Summary
Modifier and TypeMethodDescriptiongetFeatureState(Feature feature) Creates a new builder for creating aHazelcastStateRepository.newBuilder(String mapName) Creates a new builder for creating aHazelcastStateRepository.voidsetFeatureState(FeatureState featureState)
-
Field Details
-
hazelcastInstance
protected final com.hazelcast.core.HazelcastInstance hazelcastInstance -
hazelcastConfig
protected final com.hazelcast.config.Config hazelcastConfig -
hazelcastClientConfig
protected final com.hazelcast.client.config.ClientConfig hazelcastClientConfig -
mapName
-
-
Constructor Details
-
Method Details
-
getFeatureState
- Specified by:
getFeatureStatein interfaceStateRepository
-
setFeatureState
- Specified by:
setFeatureStatein interfaceStateRepository
-
newBuilder
Creates a new builder for creating aHazelcastStateRepository. -
newBuilder
Creates a new builder for creating aHazelcastStateRepository.- Parameters:
mapName- the Hazelcast map name
-