Spring Boot for VMware GemFire
Package org.springframework.geode.cache
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-typeof the entity tied to the event.ID-typeof 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 Summary
ConstructorsConstructorDescriptionConstructs a new instance ofRepositoryAsyncEventListener.RemoveAsyncEventRepositoryFunctioninitialized with the given, requiredRepositoryAsyncEventListener. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanProcess(org.apache.geode.cache.asyncqueue.AsyncEvent<ID, T> event) Determines whether the givenAsyncEventcan be processed by thisFunction.protected <R> RdoRepositoryOp(T entity) Invokes the appropriate Spring DataCrudRepositorydata access operation based on theAsyncEventOperationas determined byGatewayQueueEvent.getOperation().Methods inherited from class org.springframework.geode.cache.RepositoryAsyncEventListener.AbstractAsyncEventOperationRepositoryFunction
apply, getErrorHandler, getListener, getRepository, resolveEntity
-
Constructor Details
-
RemoveAsyncEventRepositoryFunction
Constructs a new instance ofRepositoryAsyncEventListener.RemoveAsyncEventRepositoryFunctioninitialized with the given, requiredRepositoryAsyncEventListener.- Parameters:
listener-RepositoryAsyncEventListenerforwardingAsyncEventsfor processing by thisFunction- See Also:
-
-
Method Details
-
canProcess
Determines whether the givenAsyncEventcan be processed by thisFunction. Implementing classes must override this method to specify whichAsyncEventOperationsthey are capable of processing.- Parameters:
event-AsyncEventto evaluate.- Returns:
- a boolean value indicating whether this
Functionis capable of processing the givenAsyncEvent. Default returns false. - See Also:
-
AsyncEvent
-
doRepositoryOp
Invokes the appropriate Spring DataCrudRepositorydata access operation based on theAsyncEventOperationas determined byGatewayQueueEvent.getOperation().- Specified by:
doRepositoryOpin classRepositoryAsyncEventListener.AbstractAsyncEventOperationRepositoryFunction<T,ID> - Type Parameters:
R-typeof the Spring DataCrudRepositorydata access operation return value.- Parameters:
entity- entity to process.- Returns:
- the result of invoking the Spring Data
CrudRepositorydata access operation. - See Also:
-
CrudRepository
-