Class DefaultMonitoringResultHandler<T,​E extends Exception>

  • All Implemented Interfaces:
    ResultHandler<T,​E>

    public class DefaultMonitoringResultHandler<T,​E extends Exception>
    extends Object
    implements ResultHandler<T,​E>
    A ResultHandler implementation intended for use with CTS monitored operations that do not specifically have access to the Token in the operation. This includes Delete, and both Query operations.
    • Constructor Detail

      • DefaultMonitoringResultHandler

        public DefaultMonitoringResultHandler​(ResultHandler<T,​E> handler,
                                              CTSOperationsMonitoringStore store,
                                              CTSOperation operation)
        Parameters:
        handler - The result handler being wrapped.
        store - The monitoring store to notify.
        operation - The CTS Operation to report to the store.
    • Method Detail

      • getResults

        public T getResults()
                     throws E extends Exception
        Defers to wrapped handler.
        Specified by:
        getResults in interface ResultHandler<T,​E extends Exception>
        Returns:
        A possibly null, result of type T.
        Throws:
        E - if the wrapped result handler throws it
        E extends Exception
      • processResults

        public void processResults​(T result)
        Logs the option then delegates to the wrapped implementation.
        Specified by:
        processResults in interface ResultHandler<T,​E extends Exception>
        Parameters:
        result - The result to store in this ResultHandler.
      • processError

        public void processError​(Exception error)
        Logs the option then delegates to the wrapped implementation.
        Specified by:
        processError in interface ResultHandler<T,​E extends Exception>
        Parameters:
        error - The error to store in this result handler.