All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.interceptors.InvocationExceptionFunction Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.interceptors;

import org.infinispan.commands.VisitableCommand;
import org.infinispan.context.InvocationContext;

/**
 * Callback interface for {@link BaseAsyncInterceptor#invokeNextAndExceptionally(InvocationContext, VisitableCommand, InvocationExceptionFunction)}.
 *
 * @author Dan Berindei
 * @since 9.0
 */
@FunctionalInterface
public interface InvocationExceptionFunction extends InvocationCallback {
   Object apply(InvocationContext rCtx, VisitableCommand rCommand, Throwable throwable) throws Throwable;

   @Override
   default Object apply(InvocationContext rCtx, VisitableCommand rCommand, Object rv, Throwable throwable) throws Throwable {
      if (throwable == null)
         return rv;

      return apply(rCtx, rCommand, throwable);
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy