Module io.github.bucket4j.hazelcast
Class HazelcastProxyManager<K>
java.lang.Object
io.github.bucket4j.distributed.proxy.AbstractProxyManager<K>
io.github.bucket4j.grid.hazelcast.HazelcastProxyManager<K>
- All Implemented Interfaces:
ProxyManager<K>
The extension of Bucket4j library addressed to support Hazelcast in-memory data grid.
-
Constructor Summary
ConstructorsConstructorDescriptionHazelcastProxyManager(com.hazelcast.map.IMap<K, byte[]> map) Deprecated.HazelcastProxyManager(com.hazelcast.map.IMap<K, byte[]> map, ClientSideConfig clientSideConfig) Deprecated.HazelcastProxyManager(com.hazelcast.map.IMap<K, byte[]> map, ClientSideConfig clientSideConfig, String offlodableExecutorName) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddCustomSerializers(com.hazelcast.config.SerializationConfig serializationConfig, int typeIdBase) Registers custom Hazelcast serializers for all classes from Bucket4j library which can be transferred over network.<T> CommandResult<T><T> CompletableFuture<CommandResult<T>>executeAsync(K key, Request<T> request) booleanbooleanprotected CompletableFuture<Void>removeAsync(K key) voidremoveProxy(K key) Methods inherited from class io.github.bucket4j.distributed.proxy.AbstractProxyManager
asAsync, builder, currentTimeNanos, getBackwardCompatibilityVersion, getClientSideConfig, getClientSideTime, getProxyConfigurationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.bucket4j.distributed.proxy.ProxyManager
getProxy, withMapper
-
Constructor Details
-
HazelcastProxyManager
Deprecated. -
HazelcastProxyManager
@Deprecated public HazelcastProxyManager(com.hazelcast.map.IMap<K, byte[]> map, ClientSideConfig clientSideConfig) Deprecated. -
HazelcastProxyManager
@Deprecated public HazelcastProxyManager(com.hazelcast.map.IMap<K, byte[]> map, ClientSideConfig clientSideConfig, String offlodableExecutorName) Deprecated.
-
-
Method Details
-
execute
- Specified by:
executein classAbstractProxyManager<K>
-
isAsyncModeSupported
public boolean isAsyncModeSupported() -
isExpireAfterWriteSupported
public boolean isExpireAfterWriteSupported() -
executeAsync
- Specified by:
executeAsyncin classAbstractProxyManager<K>
-
removeProxy
-
removeAsync
- Specified by:
removeAsyncin classAbstractProxyManager<K>
-
addCustomSerializers
public static void addCustomSerializers(com.hazelcast.config.SerializationConfig serializationConfig, int typeIdBase) Registers custom Hazelcast serializers for all classes from Bucket4j library which can be transferred over network. Each serializer will have different typeId, and this id will not be changed in the feature releases.Note: it would be better to leave an empty space in the Ids in order to handle the extension of Bucket4j library when new classes can be added to library. For example if you called
getAllSerializers(10000)then it would be reasonable to avoid registering your custom types in the interval 10000-10100.- Parameters:
typeIdBase- a starting number from for typeId sequence
-
Bucket4jHazelcast.entryProcessorBasedBuilder(IMap)