Class LockManagerServiceImpl
- java.lang.Object
-
- org.opendaylight.genius.lockmanager.impl.LockManagerServiceImpl
-
- All Implemented Interfaces:
LockManagerService,org.opendaylight.yangtools.yang.binding.RpcService
@Singleton public class LockManagerServiceImpl extends java.lang.Object implements LockManagerService
-
-
Constructor Summary
Constructors Constructor Description LockManagerServiceImpl(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, LockManagerUtils lockManagerUtils)
-
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)InvokelockRPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<TryLockOutput>>tryLock(TryLockInput input)Invoketry-lockRPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UnlockOutput>>unlock(UnlockInput input)InvokeunlockRPC.
-
-
-
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:LockManagerServiceInvokelockRPC.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:
lockin interfaceLockManagerService- Parameters:
input- oflock- 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:LockManagerServiceInvoketry-lockRPC.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:
tryLockin interfaceLockManagerService- Parameters:
input- oftry-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:LockManagerServiceInvokeunlockRPC.Method that removes the lock from the list of locks- Specified by:
unlockin interfaceLockManagerService- Parameters:
input- ofunlock- Returns:
- output of
unlock
-
-