Interface LockManagerService

  • All Superinterfaces:
    org.opendaylight.yangtools.yang.binding.RpcService
    All Known Implementing Classes:
    LockManagerServiceImpl

    @Generated("mdsal-binding-generator")
    public interface LockManagerService
    extends org.opendaylight.yangtools.yang.binding.RpcService
    Interface for implementing the following YANG RPCs defined in module lock-manager
     rpc lock {
       input input {
         leaf lock-name {
           type string;
         }
       }
     }
     rpc try-lock {
       input input {
         leaf lock-name {
           type string;
         }
         leaf time {
           type uint32;
         }
         leaf time-unit {
           type time-units;
         }
       }
     }
     rpc unlock {
       input input {
         leaf lock-name {
           type string;
         }
       }
     }
     
    • Method Summary

      All Methods Instance Methods Abstract 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.
    • Method Detail

      • lock

        @CheckReturnValue
        com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<LockOutput>> lock​(LockInput input)
        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
             
         
        Parameters:
        input - of lock
        Returns:
        output of lock
      • tryLock

        @CheckReturnValue
        com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<TryLockOutput>> tryLock​(TryLockInput input)
        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
             
         
        Parameters:
        input - of try-lock
        Returns:
        output of try-lock
      • unlock

        @CheckReturnValue
        com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UnlockOutput>> unlock​(UnlockInput input)
        Invoke unlock RPC.
             
                 Method that removes the lock from the list of locks
             
         
        Parameters:
        input - of unlock
        Returns:
        output of unlock