org.omnaest.utils.operation.decorator
Class OperationDecoratorReentrantLock<RESULT,PARAMETER>

java.lang.Object
  extended by org.omnaest.utils.operation.decorator.OperationDecorator<RESULT,PARAMETER>
      extended by org.omnaest.utils.operation.decorator.OperationDecoratorReentrantLock<RESULT,PARAMETER>
Type Parameters:
RESULT -
PARAMETER -
All Implemented Interfaces:
Operation<RESULT,PARAMETER>

public class OperationDecoratorReentrantLock<RESULT,PARAMETER>
extends OperationDecorator<RESULT,PARAMETER>

An OperationDecorator which decorates the Operation.execute(Object) invocation with the use of ReentrantLock.lock().

Author:
Omnaest

Field Summary
protected  ReentrantLock reentrantLock
           
 
Fields inherited from class org.omnaest.utils.operation.decorator.OperationDecorator
operation
 
Constructor Summary
OperationDecoratorReentrantLock(Operation<RESULT,PARAMETER> operation)
           
OperationDecoratorReentrantLock(Operation<RESULT,PARAMETER> operation, ReentrantLock reentrantLock)
           
 
Method Summary
 RESULT execute(PARAMETER parameter)
           
 
Methods inherited from class org.omnaest.utils.operation.decorator.OperationDecorator
setOperation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

reentrantLock

protected ReentrantLock reentrantLock
Constructor Detail

OperationDecoratorReentrantLock

public OperationDecoratorReentrantLock(Operation<RESULT,PARAMETER> operation,
                                       ReentrantLock reentrantLock)
Parameters:
operation -
reentrantLock -

OperationDecoratorReentrantLock

public OperationDecoratorReentrantLock(Operation<RESULT,PARAMETER> operation)
Parameters:
operation -
Method Detail

execute

public RESULT execute(PARAMETER parameter)


Copyright © 2013. All Rights Reserved.