public class InterceptorRegistry extends Object
IMap
interceptors
Interceptors are read mostly and this registry keeps all registered interceptor in an array to easily iterate on them.
Other than that, synchronized blocks are used to prevent leaks when concurrently registering/de-registering interceptors.
Keep in mind that all registration/de-registration operations are done in generic-operation-threads, in other words,
synchronized methods are not used in partition-threads.
This registry is created per map.MapInterceptor
Constructor and Description |
---|
InterceptorRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
deregister(String id)
De-registers
MapInterceptor for the supplied `id`, if there is any. |
Map<String,MapInterceptor> |
getId2InterceptorMap() |
List<MapInterceptor> |
getInterceptors()
Returns all registered interceptors.
|
void |
register(String id,
MapInterceptor interceptor)
Registers a
MapInterceptor for the supplied `id`. |
public List<MapInterceptor> getInterceptors()
PartitionOperationThread
DefaultRecordStore.put(com.hazelcast.nio.serialization.Data, java.lang.Object, long, long)
public Map<String,MapInterceptor> getId2InterceptorMap()
public void register(String id, MapInterceptor interceptor)
MapInterceptor
for the supplied `id`.
If there is no registration associated with the `id`, registers interceptor,
otherwise silently ignores registration.
This method is called by GenericOperationThread
when registering via AddInterceptorOperation
id
- ID of the interceptorinterceptor
- supplied MapInterceptor
public void deregister(String id)
MapInterceptor
for the supplied `id`, if there is any.
This method is called by GenericOperationThread
when de-registering via RemoveInterceptorOperation
id
- ID of the interceptorCopyright © 2018 Hazelcast, Inc.. All Rights Reserved.