Class RepositoryAsyncEventListener.RemoveAsyncEventRepositoryFunction<T,ID>

java.lang.Object
org.springframework.geode.cache.RepositoryAsyncEventListener.AbstractAsyncEventOperationRepositoryFunction<T,ID>
org.springframework.geode.cache.RepositoryAsyncEventListener.RemoveAsyncEventRepositoryFunction<T,ID>
Type Parameters:
T - type of the entity tied to the event.
ID - type of the identifier of the entity.
All Implemented Interfaces:
Function<org.apache.geode.cache.asyncqueue.AsyncEvent<ID,T>,Boolean>, RepositoryAsyncEventListener.AsyncEventOperationRepositoryFunction<T,ID>
Enclosing class:
RepositoryAsyncEventListener<T,ID>

public static class RepositoryAsyncEventListener.RemoveAsyncEventRepositoryFunction<T,ID> extends RepositoryAsyncEventListener.AbstractAsyncEventOperationRepositoryFunction<T,ID>
An Function implementation capable of handling Operation.REMOVE AsyncEvents. Invokes the CrudRepository.delete(Object) data access operation.
  • Constructor Details

  • Method Details

    • canProcess

      public boolean canProcess(@Nullable org.apache.geode.cache.asyncqueue.AsyncEvent<ID,T> event)
      Determines whether the given AsyncEvent can be processed by this Function. Implementing classes must override this method to specify which AsyncEvent Operations they are capable of processing.
      Parameters:
      event - AsyncEvent to evaluate.
      Returns:
      a boolean value indicating whether this Function is capable of processing the given AsyncEvent. Default returns false.
      See Also:
      • AsyncEvent
    • doRepositoryOp

      protected <R> R doRepositoryOp(T entity)
      Invokes the appropriate Spring Data CrudRepository data access operation based on the AsyncEvent Operation as determined by GatewayQueueEvent.getOperation().
      Specified by:
      doRepositoryOp in class RepositoryAsyncEventListener.AbstractAsyncEventOperationRepositoryFunction<T,ID>
      Type Parameters:
      R - type of the Spring Data CrudRepository data access operation return value.
      Parameters:
      entity - entity to process.
      Returns:
      the result of invoking the Spring Data CrudRepository data access operation.
      See Also:
      • CrudRepository