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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.hazelcast.cp.ISemaphore
    acquireSemaphore(com.hazelcast.core.HazelcastInstance hazelcastInstance, org.eclipse.aether.named.NamedLockKey key)
    Invoked when new instance of semaphore needed for given key.
    void
    releaseSemaphore(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait