Class HazelcastSemaphoreNamedLockFactory
java.lang.Object
org.eclipse.aether.named.support.NamedLockFactorySupport
org.eclipse.aether.named.hazelcast.HazelcastSemaphoreNamedLockFactory
- All Implemented Interfaces:
org.eclipse.aether.named.NamedLockFactory
- Direct Known Subclasses:
HazelcastClientCPSemaphoreNamedLockFactory
,HazelcastCPSemaphoreNamedLockFactory
public class HazelcastSemaphoreNamedLockFactory
extends org.eclipse.aether.named.support.NamedLockFactorySupport
Factory of
AdaptedSemaphoreNamedLock
instances, using adapted Hazelcast ISemaphore
. It delegates
most the work to HazelcastSemaphoreProvider
and this class just adapts the returned semaphore to named lock
and caches ISemaphore
instances, as recommended by Hazelcast.-
Field Summary
Modifier and TypeFieldDescriptionprotected final com.hazelcast.core.HazelcastInstance
protected final boolean
Fields inherited from class org.eclipse.aether.named.support.NamedLockFactorySupport
logger, SYSTEM_PROP_DIAGNOSTIC_ENABLED
-
Constructor Summary
ConstructorDescriptionHazelcastSemaphoreNamedLockFactory
(com.hazelcast.core.HazelcastInstance hazelcastInstance, boolean manageHazelcast, HazelcastSemaphoreProvider hazelcastSemaphoreProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.aether.named.support.AdaptedSemaphoreNamedLock
createLock
(String name) protected void
destroyLock
(String name) void
shutdown()
Methods inherited from class org.eclipse.aether.named.support.NamedLockFactorySupport
closeLock, getLock, isDiagnosticEnabled, onFailure
-
Field Details
-
hazelcastInstance
-
manageHazelcast
-
-
Constructor Details
-
HazelcastSemaphoreNamedLockFactory
public HazelcastSemaphoreNamedLockFactory(com.hazelcast.core.HazelcastInstance hazelcastInstance, boolean manageHazelcast, HazelcastSemaphoreProvider hazelcastSemaphoreProvider)
-
-
Method Details
-
createLock
- Specified by:
createLock
in classorg.eclipse.aether.named.support.NamedLockFactorySupport
-
destroyLock
- Overrides:
destroyLock
in classorg.eclipse.aether.named.support.NamedLockFactorySupport
-
shutdown
- Specified by:
shutdown
in interfaceorg.eclipse.aether.named.NamedLockFactory
- Overrides:
shutdown
in classorg.eclipse.aether.named.support.NamedLockFactorySupport
-