Class DummyOperationContext
- java.lang.Object
-
- org.apache.activemq.artemis.core.persistence.impl.journal.DummyOperationContext
-
- All Implemented Interfaces:
IOCallback,IOCompletion,OperationContext
public final class DummyOperationContext extends Object implements OperationContext
-
-
Constructor Summary
Constructors Constructor Description DummyOperationContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddone()Method for sync notifications.voidexecuteOnCompletion(IOCallback runnable)Execute the task when all IO operations are complete, Or execute it immediately if nothing is pending.voidexecuteOnCompletion(IOCallback runnable, boolean storeOnly)Execute the task when all IO operations are complete, Or execute it immediately if nothing is pending.static OperationContextgetInstance()voidonError(int errorCode, String errorMessage)Method for error notifications.voidpageSyncDone()voidpageSyncLineUp()voidreplicationDone()voidreplicationLineUp()voidstoreLineUp()voidwaitCompletion()booleanwaitCompletion(long timeout)
-
-
-
Method Detail
-
getInstance
public static OperationContext getInstance()
-
executeOnCompletion
public void executeOnCompletion(IOCallback runnable)
Description copied from interface:OperationContextExecute the task when all IO operations are complete, Or execute it immediately if nothing is pending.- Specified by:
executeOnCompletionin interfaceOperationContext- Parameters:
runnable- the tas to be executed.
-
executeOnCompletion
public void executeOnCompletion(IOCallback runnable, boolean storeOnly)
Description copied from interface:OperationContextExecute the task when all IO operations are complete, Or execute it immediately if nothing is pending.- Specified by:
executeOnCompletionin interfaceOperationContext- Parameters:
runnable- 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 DuplicateCache
-
replicationDone
public void replicationDone()
- Specified by:
replicationDonein interfaceOperationContext
-
replicationLineUp
public void replicationLineUp()
- Specified by:
replicationLineUpin interfaceOperationContext
-
storeLineUp
public void storeLineUp()
- Specified by:
storeLineUpin interfaceIOCompletion
-
done
public void done()
Description copied from interface:IOCallbackMethod for sync notifications. When this callback method is called, there is a guarantee the data is written on the disk.
Note:Leave this method as soon as possible, or you would be blocking the whole notification thread- Specified by:
donein interfaceIOCallback
-
onError
public void onError(int errorCode, String errorMessage)Description copied from interface:IOCallbackMethod for error notifications. Observation: The whole file will be probably failing if this happens. Like, if you delete the file, you will start to get errors for these operations- Specified by:
onErrorin interfaceIOCallback
-
waitCompletion
public void waitCompletion()
- Specified by:
waitCompletionin interfaceOperationContext
-
waitCompletion
public boolean waitCompletion(long timeout)
- Specified by:
waitCompletionin interfaceOperationContext- Parameters:
timeout- in milliseconds- Returns:
-
pageSyncLineUp
public void pageSyncLineUp()
- Specified by:
pageSyncLineUpin interfaceOperationContext
-
pageSyncDone
public void pageSyncDone()
- Specified by:
pageSyncDonein interfaceOperationContext
-
-