Class DirectHazelcastSemaphoreProvider
java.lang.Object
org.eclipse.aether.named.hazelcast.HazelcastSemaphoreProvider
org.eclipse.aether.named.hazelcast.DirectHazelcastSemaphoreProvider
Direct provider of
ISemaphore instances: it simply uses the passed in lock name to create semaphore name out
of it. This implies, that as many lock names are requested from it, this class will create as many semaphores in
Hazelcast.-
Field Summary
Fields inherited from class org.eclipse.aether.named.hazelcast.HazelcastSemaphoreProvider
NAME_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.hazelcast.cp.ISemaphoreacquireSemaphore(com.hazelcast.core.HazelcastInstance hazelcastInstance, org.eclipse.aether.named.NamedLockKey key) Invoked when new instance of semaphore needed for given key.voidreleaseSemaphore(com.hazelcast.core.HazelcastInstance hazelcastInstance, org.eclipse.aether.named.NamedLockKey key, com.hazelcast.cp.ISemaphore semaphore) Invoked when passed in semaphore associated with passed in key is not to be used anymore.
-
Constructor Details
-
DirectHazelcastSemaphoreProvider
public DirectHazelcastSemaphoreProvider()
-
-
Method Details
-
acquireSemaphore
public com.hazelcast.cp.ISemaphore acquireSemaphore(com.hazelcast.core.HazelcastInstance hazelcastInstance, org.eclipse.aether.named.NamedLockKey key) Description copied from class:HazelcastSemaphoreProviderInvoked when new instance of semaphore needed for given key. must not returnnull.- Specified by:
acquireSemaphorein classHazelcastSemaphoreProvider
-
releaseSemaphore
public void releaseSemaphore(com.hazelcast.core.HazelcastInstance hazelcastInstance, org.eclipse.aether.named.NamedLockKey key, com.hazelcast.cp.ISemaphore semaphore) Description copied from class:HazelcastSemaphoreProviderInvoked when passed in semaphore associated with passed in key is not to be used anymore.- Specified by:
releaseSemaphorein classHazelcastSemaphoreProvider
-