public class OperationContextImpl extends Object implements OperationContext
Constructor and Description |
---|
OperationContextImpl(Executor executor) |
Modifier and Type | Method and Description |
---|---|
static void |
clearContext() |
void |
complete() |
void |
done()
Method for sync notifications.
|
void |
executeOnCompletion(IOCallback runnable)
Execute the task when all IO operations are complete,
Or execute it immediately if nothing is pending.
|
void |
executeOnCompletion(IOCallback completion,
boolean storeOnly)
Execute the task when all IO operations are complete,
Or execute it immediately if nothing is pending.
|
static OperationContext |
getContext() |
static OperationContext |
getContext(ExecutorFactory executorFactory) |
void |
onError(int errorCode,
String errorMessage)
Method for error notifications.
|
void |
pageSyncDone() |
void |
pageSyncLineUp() |
void |
replicationDone() |
void |
replicationLineUp() |
static void |
setContext(OperationContext context) |
void |
storeLineUp() |
String |
toString() |
void |
waitCompletion() |
boolean |
waitCompletion(long timeout) |
public OperationContextImpl(Executor executor)
public static void clearContext()
public static final OperationContext getContext()
public static OperationContext getContext(ExecutorFactory executorFactory)
public static void setContext(OperationContext context)
public void pageSyncLineUp()
pageSyncLineUp
in interface OperationContext
public void pageSyncDone()
pageSyncDone
in interface OperationContext
public void storeLineUp()
storeLineUp
in interface IOCompletion
public void replicationLineUp()
replicationLineUp
in interface OperationContext
public void replicationDone()
replicationDone
in interface OperationContext
public void executeOnCompletion(IOCallback runnable)
OperationContext
executeOnCompletion
in interface OperationContext
runnable
- the tas to be executed.public void executeOnCompletion(IOCallback completion, boolean storeOnly)
OperationContext
executeOnCompletion
in interface OperationContext
completion
- the tas to be executed.storeOnly
- There are tasks that won't need to wait on replication or paging and will need to
be completed as soon as the response from the journal is received. An example would be the
DuplicateCachepublic void done()
IOCallback
done
in interface IOCallback
public void complete()
public void onError(int errorCode, String errorMessage)
IOCallback
onError
in interface IOCallback
public void waitCompletion() throws Exception
waitCompletion
in interface OperationContext
Exception
public boolean waitCompletion(long timeout) throws InterruptedException, ActiveMQException
waitCompletion
in interface OperationContext
timeout
- in millisecondsInterruptedException
ActiveMQException
Copyright © 2017 JBoss by Red Hat. All rights reserved.