Class DelegateCallback
- java.lang.Object
-
- org.apache.activemq.artemis.core.io.DelegateCallback
-
- All Implemented Interfaces:
IOCallback
public final class DelegateCallback extends Object implements IOCallback
It is a utility class to allow severalIOCallbacks to be used as one.
-
-
Constructor Summary
Constructors Constructor Description DelegateCallback(Collection<? extends IOCallback> delegates)It doesn't copy defensively the givendelegates.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddone()Method for sync notifications.voidonError(int errorCode, String errorMessage)Method for error notifications.
-
-
-
Constructor Detail
-
DelegateCallback
public DelegateCallback(Collection<? extends IOCallback> delegates)
It doesn't copy defensively the givendelegates.- Throws:
NullPointerException- ifdelegatesisnull
-
-
Method Detail
-
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
-
-