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) |
protected void |
destroyLock(String name) |
void |
shutdown() |
closeLock, finalize, getLock
protected 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)
createLock
in class NamedLockFactorySupport
public void shutdown()
shutdown
in interface NamedLockFactory
shutdown
in class NamedLockFactorySupport
protected void destroyLock(String name)
destroyLock
in class NamedLockFactorySupport
Copyright © 2010–2021 The Apache Software Foundation. All rights reserved.