Class DelegateCallback

  • All Implemented Interfaces:
    IOCallback

    public final class DelegateCallback
    extends java.lang.Object
    implements IOCallback
    It is a utility class to allow several IOCallbacks to be used as one.
    • Constructor Summary

      Constructors 
      Constructor Description
      DelegateCallback​(java.util.Collection<? extends IOCallback> delegates)
      It doesn't copy defensively the given delegates.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void done()
      Method for sync notifications.
      void onError​(int errorCode, java.lang.String errorMessage)
      Method for error notifications.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DelegateCallback

        public DelegateCallback​(java.util.Collection<? extends IOCallback> delegates)
        It doesn't copy defensively the given delegates.
        Throws:
        java.lang.NullPointerException - if delegates is null
    • Method Detail

      • done

        public void done()
        Description copied from interface: IOCallback
        Method 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:
        done in interface IOCallback
      • onError

        public void onError​(int errorCode,
                            java.lang.String errorMessage)
        Description copied from interface: IOCallback
        Method 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:
        onError in interface IOCallback