Interface NamedLockFactory

All Known Implementing Classes:
FileLockNamedLockFactory, HazelcastClientCPSemaphoreNamedLockFactory, HazelcastCPSemaphoreNamedLockFactory, HazelcastSemaphoreNamedLockFactory, LocalReadWriteLockNamedLockFactory, LocalSemaphoreNamedLockFactory, NamedLockFactorySupport, NoopNamedLockFactory, RedissonNamedLockFactorySupport, RedissonReadWriteLockNamedLockFactory, RedissonSemaphoreNamedLockFactory

public interface NamedLockFactory
A factory of NamedLocks.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates or reuses existing NamedLock.
    void
    Performs a clean shut down of the factory.
  • Method Details

    • getLock

      Creates or reuses existing NamedLock. Returns instance MUST BE treated as "resource", best in try-with-resource block.
      Parameters:
      name - the lock name, must not be null.
      Returns:
      named lock instance, never null.
    • shutdown

      void shutdown()
      Performs a clean shut down of the factory.