org.omnaest.utils.operation
Class OperationUtils

java.lang.Object
  extended by org.omnaest.utils.operation.OperationUtils

public class OperationUtils
extends Object

Helper for Operation

Author:
Omnaest

Constructor Summary
OperationUtils()
           
 
Method Summary
static
<R,P> R
executeWithLocks(Operation<R,P> operation, P paramter, Lock... locks)
           
static void executeWithLocks(OperationIntrinsic operation, Lock... locks)
           
static
<P> void
executeWithLocks(OperationVoid<P> operation, P parameter, Lock... locks)
          Similar to executeWithLocks(OperationIntrinsic, Lock...)
static
<R> R
executeWithLocks(OperationWithResult<R> operation, Lock... locks)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationUtils

public OperationUtils()
Method Detail

executeWithLocks

public static <R,P> R executeWithLocks(Operation<R,P> operation,
                                       P paramter,
                                       Lock... locks)
Parameters:
operation - OperationWithResult
paramter -
locks - Lock
Returns:
result

executeWithLocks

public static <R> R executeWithLocks(OperationWithResult<R> operation,
                                     Lock... locks)
Parameters:
operation - OperationWithResult
locks - Lock
Returns:
result

executeWithLocks

public static <P> void executeWithLocks(OperationVoid<P> operation,
                                        P parameter,
                                        Lock... locks)
Similar to executeWithLocks(OperationIntrinsic, Lock...)

Parameters:
operation - OperationVoid
parameter -
locks - Lock

executeWithLocks

public static void executeWithLocks(OperationIntrinsic operation,
                                    Lock... locks)
Parameters:
operation - OperationIntrinsic
locks - Lock


Copyright © 2013. All Rights Reserved.