Class LockManagerServiceImpl

  • All Implemented Interfaces:
    LockManagerService, org.opendaylight.yangtools.yang.binding.RpcService

    @Singleton
    public class LockManagerServiceImpl
    extends java.lang.Object
    implements LockManagerService
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<LockOutput>> lock​(LockInput input)
      Invoke lock RPC.
      com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<TryLockOutput>> tryLock​(TryLockInput input)
      Invoke try-lock RPC.
      com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UnlockOutput>> unlock​(UnlockInput input)
      Invoke unlock RPC.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LockManagerServiceImpl

        @Inject
        public LockManagerServiceImpl​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker,
                                      LockManagerUtils lockManagerUtils)
    • Method Detail

      • lock

        public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<LockOutput>> lock​(LockInput input)
        Description copied from interface: LockManagerService
        Invoke lock RPC.
             
                 Method that checks if its locked already. If not adds the lock to the list of
                 locks. Else tries until it acquires the lock
             
         
        Specified by:
        lock in interface LockManagerService
        Parameters:
        input - of lock
        Returns:
        output of lock
      • tryLock

        public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<TryLockOutput>> tryLock​(TryLockInput input)
        Description copied from interface: LockManagerService
        Invoke try-lock RPC.
             
                 Method that checks if its locked already. If not adds the lock to the list of
                 locks. Else tries for the specified time
             
         
        Specified by:
        tryLock in interface LockManagerService
        Parameters:
        input - of try-lock
        Returns:
        output of try-lock
      • unlock

        public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UnlockOutput>> unlock​(UnlockInput input)
        Description copied from interface: LockManagerService
        Invoke unlock RPC.
             
                 Method that removes the lock from the list of locks
             
         
        Specified by:
        unlock in interface LockManagerService
        Parameters:
        input - of unlock
        Returns:
        output of unlock