org.hornetq.core.persistence.impl.journal
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(IOAsyncTask runnable)
Execute the task when all IO operations are complete,
Or execute it immediately if nothing is pending.
|
void |
executeOnCompletion(IOAsyncTask 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(IOAsyncTask runnable)
OperationContext
executeOnCompletion
in interface OperationContext
runnable
- the tas to be executed.public void executeOnCompletion(IOAsyncTask 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()
AIOCallback
done
in interface AIOCallback
public void complete()
public void onError(int errorCode, String errorMessage)
AIOCallback
onError
in interface AIOCallback
public void waitCompletion() throws Exception
waitCompletion
in interface OperationContext
Exception
public boolean waitCompletion(long timeout) throws InterruptedException, HornetQException
waitCompletion
in interface OperationContext
timeout
- in millisecondsInterruptedException
HornetQException
Copyright © 2016 JBoss, a division of Red Hat. All Rights Reserved.