public class HazelcastSemaphoreNamedLockFactory extends NamedLockFactorySupport
AdaptedSemaphoreNamedLock instances using adapted Hazelcast ISemaphore. This class may
use HazelcastInstance backed by Hazelcast Server or Hazelcast Client.| Modifier and Type | Field and Description |
|---|---|
protected static String |
NAME_PREFIX |
logger| Constructor and Description |
|---|
HazelcastSemaphoreNamedLockFactory(com.hazelcast.core.HazelcastInstance hazelcastInstance,
BiFunction<com.hazelcast.core.HazelcastInstance,String,com.hazelcast.cp.ISemaphore> semaphoreFunction,
boolean destroySemaphore,
boolean manageHazelcast) |
| Modifier and Type | Method and Description |
|---|---|
protected AdaptedSemaphoreNamedLock |
createLock(String name)
Implementations shall create and return
NamedLockSupport for given name, this method must never
return null. |
protected void |
destroyLock(String name)
Implementation may override this (empty) method to perform some sort of implementation specific cleanup for
given lock name.
|
void |
shutdown()
Performs a clean shut down of the factory.
|
closeLock, finalize, getLockprotected static final String NAME_PREFIX
public HazelcastSemaphoreNamedLockFactory(com.hazelcast.core.HazelcastInstance hazelcastInstance, BiFunction<com.hazelcast.core.HazelcastInstance,String,com.hazelcast.cp.ISemaphore> semaphoreFunction, boolean destroySemaphore, boolean manageHazelcast)
protected AdaptedSemaphoreNamedLock createLock(String name)
NamedLockFactorySupportNamedLockSupport for given name, this method must never
return null.createLock in class NamedLockFactorySupportpublic void shutdown()
NamedLockFactoryshutdown in interface NamedLockFactoryshutdown in class NamedLockFactorySupportprotected void destroyLock(String name)
NamedLockFactorySupportdestroyLock in class NamedLockFactorySupportCopyright © 2010–2021 The Apache Software Foundation. All rights reserved.