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)
Invokelock
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<TryLockOutput>>
tryLock(TryLockInput input)
Invoketry-lock
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UnlockOutput>>
unlock(UnlockInput input)
Invokeunlock
RPC.
-
-
-
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
Invokelock
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 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:LockManagerService
Invoketry-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 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:LockManagerService
Invokeunlock
RPC.Method that removes the lock from the list of locks
- Specified by:
unlock
in interfaceLockManagerService
- Parameters:
input
- ofunlock
- Returns:
- output of
unlock
-
-