org.infinispan.commons.tx.AsyncSynchronization Maven / Gradle / Ivy
package org.infinispan.commons.tx;
import java.util.concurrent.CompletionStage;
import javax.transaction.Synchronization;
/**
* Non-blocking {@link javax.transaction.Synchronization}.
*
* @since 14.0
*/
public interface AsyncSynchronization {
/**
* @return A {@link CompletionStage} which is completed with the result of {@link Synchronization#beforeCompletion()}.
* @see Synchronization#beforeCompletion()
*/
CompletionStage asyncBeforeCompletion();
/**
* @return A {@link CompletionStage} which is completed with the result of {@link Synchronization#afterCompletion(int)}.
* @see Synchronization#afterCompletion(int)
*/
CompletionStage asyncAfterCompletion(int status);
}