T - type of the entity tied to the event.ID - type of the identifier of the entity.public static class RepositoryAsyncEventListener.RemoveAsyncEventRepositoryFunction<T,ID> extends RepositoryAsyncEventListener.AbstractAsyncEventOperationRepositoryFunction<T,ID>
Function implementation capable of handling Operation.REMOVE AsyncEvents.
Invokes the CrudRepository.delete(Object) data access operation.| Constructor and Description |
|---|
RemoveAsyncEventRepositoryFunction(RepositoryAsyncEventListener<T,ID> listener)
Constructs a new instance of
RepositoryAsyncEventListener.RemoveAsyncEventRepositoryFunction initialized with the given, required
RepositoryAsyncEventListener. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProcess(org.apache.geode.cache.asyncqueue.AsyncEvent<ID,T> event)
Determines whether the given
AsyncEvent can be processed by this Function. |
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(). |
apply, getErrorHandler, getListener, getRepository, resolveEntitypublic RemoveAsyncEventRepositoryFunction(@NonNull
RepositoryAsyncEventListener<T,ID> listener)
RepositoryAsyncEventListener.RemoveAsyncEventRepositoryFunction initialized with the given, required
RepositoryAsyncEventListener.listener - RepositoryAsyncEventListener forwarding AsyncEvents for processing
by this FunctionRepositoryAsyncEventListenerpublic boolean canProcess(@Nullable
org.apache.geode.cache.asyncqueue.AsyncEvent<ID,T> event)
RepositoryAsyncEventListener.AsyncEventOperationRepositoryFunctionAsyncEvent can be processed by this Function.
Implementing classes must override this method to specify which AsyncEvent
Operations they are capable of processing.event - AsyncEvent to evaluate.Function is capable of processing
the given AsyncEvent. Default returns false.AsyncEventprotected <R> R doRepositoryOp(T entity)
RepositoryAsyncEventListener.AbstractAsyncEventOperationRepositoryFunctionCrudRepository data access operation based on the
AsyncEvent Operation as determined by GatewayQueueEvent.getOperation().doRepositoryOp in class RepositoryAsyncEventListener.AbstractAsyncEventOperationRepositoryFunction<T,ID>R - type of the Spring Data CrudRepository data access operation return value.entity - entity to process.CrudRepository data access operation.CrudRepository