Interface CoherenceRepository<T,ID>
- Type Parameters:
T- the domain type the repository managesID- the type of the id of the entity the repository manages
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<T,,ID> ListenerSupport<T,,ID> org.springframework.data.repository.PagingAndSortingRepository<T,,ID> org.springframework.data.repository.Repository<T,ID>
Repository interface.- Since:
- 3.0
- Author:
- Ryan Lubke, Gunnar Hillert
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Register a listener that will observe all repository events.voidaddListener(com.tangosol.util.Filter<?> filter, com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Register a listener that will observe all events for entities that satisfy the specified criteria.voidaddListener(ID id, com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Register a listener that will observe all events for a specific entity.average(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor) Return the average of the specified function.doubleaverage(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor) Return the average of the specified function.doubleaverage(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor) Return the average of the specified function.doubleaverage(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor) Return the average of the specified function.Return the average of the specified function.doubleReturn the average of the specified function.doubleReturn the average of the specified function.doubleReturn the average of the specified function.longcount()longcount(com.tangosol.util.Filter<?> filter) Return the number of entities in this repository that satisfy specified filter.voidDelete specified entity.voidbooleandeleteAll(com.tangosol.util.Filter<?> filter) Delete all entities based on the specified criteria.deleteAll(com.tangosol.util.Filter<?> filter, boolean fReturn) Remove all entities based on the specified criteria.voidbooleandeleteAll(Collection<? extends T> colEntities) Delete specified entities.deleteAll(Collection<? extends T> colEntities, boolean fReturn) Delete specified entities.booleanDelete specified entities.Delete specified entities.voiddeleteAllById(Iterable<? extends ID> ids) booleandeleteAllById(Collection<? extends ID> colIds) Delete entities with the specified identifiers.deleteAllById(Collection<? extends ID> colIds, boolean fReturn) Delete entities with the specified identifiers.voiddeleteById(ID id) <R> Collection<? extends R>distinct(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return the set of distinct values for the specified extractor.<R> Collection<? extends R>Return the set of distinct values for the specified extractor.booleanexistsById(ID id) findAll()org.springframework.data.domain.Page<T>findAll(org.springframework.data.domain.Pageable pageable) findAll(org.springframework.data.domain.Sort sort) findAllById(Iterable<ID> ids) <R> RReturn the value extracted from an entity with a given identifier.getAll(com.tangosol.util.Filter<?> filter) Return all entities that satisfy the specified criteria.getAll(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return a map of values extracted from a set of entities based on the specified criteria.Return a map of values extracted from all entities in the repository.getAll(Collection<? extends ID> colIds, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return a map of values extracted from a set of entities with the given identifiers.getAllOrderedBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.Comparator<? super T> orderBy) Return all entities that satisfy the specified criteria, sorted using specifiedRemote.Comparator.<R extends Comparable<? super R>>
Collection<T>getAllOrderedBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> orderBy) Return all entities that satisfy the specified criteria, sorted using specifiedComparableattribute.getAllOrderedBy(com.tangosol.util.function.Remote.Comparator<? super T> orderBy) Return all entities in this repository, sorted using specifiedRemote.Comparator.<R extends Comparable<? super R>>
Collection<T>getAllOrderedBy(com.tangosol.util.ValueExtractor<? super T, ? extends R> orderBy) Return all entities in this repository, sorted using specifiedComparableattribute.getMap()Return the underlyingNamedMapthat backs thisRepository.groupBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor) Return the grouping of entities by the specified extractor.groupBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.function.Remote.Comparator<? super T> orderBy) Return the grouping of entities by the specified extractor, ordered by the specified attribute within each group.<K,A, R, M extends Map<K, R>>
MgroupBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.function.Remote.Supplier<M> mapFactory, com.tangosol.util.stream.RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.<K,A, R> Map<K, R> groupBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.stream.RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.Return the grouping of entities by the specified extractor.groupBy(com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.function.Remote.Comparator<? super T> orderBy) Return the grouping of entities by the specified extractor, ordered by the specified attribute within each group.<K,A, R, M extends Map<K, R>>
MgroupBy(com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.function.Remote.Supplier<M> mapFactory, com.tangosol.util.stream.RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.<K,A, R> Map<K, R> groupBy(com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.stream.RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.com.oracle.coherence.repository.AbstractRepositoryBase.Listener.Builder<T>listener()Create newAbstractRepositoryBase.Listener.Builderinstance.max(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor) Return the maximum value of the specified function.<R extends Comparable<? super R>>
Rmax(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToComparableFunction<? super T, R> extractor) Return the maximum value of the specified function.doublemax(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor) Return the maximum value of the specified function.intmax(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor) Return the maximum value of the specified function.longmax(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor) Return the maximum value of the specified function.Return the maximum value of the specified function.<R extends Comparable<? super R>>
RReturn the maximum value of the specified function.doubleReturn the maximum value of the specified function.intReturn the maximum value of the specified function.longReturn the maximum value of the specified function.<R extends Comparable<? super R>>
Optional<T>maxBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return the entity with the maximum value of the specified function.<R extends Comparable<? super R>>
Optional<T>Return the entity with the maximum value of the specified function.min(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor) Return the minimum value of the specified function.<R extends Comparable<? super R>>
Rmin(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToComparableFunction<? super T, R> extractor) Return the minimum value of the specified function.doublemin(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor) Return the minimum value of the specified function.intmin(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor) Return the minimum value of the specified function.longmin(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor) Return the minimum value of the specified function.Return the minimum value of the specified function.<R extends Comparable<? super R>>
RReturn the minimum value of the specified function.doubleReturn the minimum value of the specified function.intReturn the minimum value of the specified function.longReturn the minimum value of the specified function.<R extends Comparable<? super R>>
Optional<T>minBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return the entity with the minimum value of the specified function.<R extends Comparable<? super R>>
Optional<T>Return the entity with the minimum value of the specified function.voidremoveListener(com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Unregister a listener that observes all repository events.voidremoveListener(com.tangosol.util.Filter<?> filter, com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Unregister a listener that observes all events for entities that satisfy the specified criteria.voidremoveListener(ID id, com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Unregister a listener that observes all events for a specific entity.<S extends T>
Ssave(S entity) voidStore all specified entities as a batch.com.tangosol.util.stream.RemoteStream<T>stream()Return a stream of all entities in this repository.com.tangosol.util.stream.RemoteStream<T>stream(com.tangosol.util.Filter<?> filter) Return a stream of all entities in this repository that satisfy the specified criteria.com.tangosol.util.stream.RemoteStream<T>stream(Collection<? extends ID> colIds) Return a stream of entities with the specified identifiers.sum(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor) Return the sum of the specified function.doublesum(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor) Return the sum of the specified function.longsum(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor) Return the sum of the specified function.longsum(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor) Return the sum of the specified function.Return the sum of the specified function.doubleReturn the sum of the specified function.longReturn the sum of the specified function.longReturn the sum of the specified function.<R extends Comparable<? super R>>
List<R>top(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor, int cResults) Return the top N highest values for the specified extractor.<R> List<R>top(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor, com.tangosol.util.function.Remote.Comparator<? super R> comparator, int cResults) Return the top N highest values for the specified extractor.<R extends Comparable<? super R>>
List<R>Return the top N highest values for the specified extractor.<R> List<R>top(com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor, com.tangosol.util.function.Remote.Comparator<? super R> comparator, int cResults) Return the top N highest values for the specified extractor.topBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.Comparator<? super T> comparator, int cResults) Return the top N entities with the highest values for the specified extractor.<R extends Comparable<? super R>>
List<T>topBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor, int cResults) Return the top N entities with the highest values for the specified extractor.Return the top N entities with the highest values for the specified extractor.<R extends Comparable<? super R>>
List<T>Return the top N entities with the highest values for the specified extractor.<U,R> R update(ID id, com.tangosol.util.function.Remote.BiFunction<? super T, ? super U, ? extends R> updater, U value) Update an entity using specified updater and the new value.<U,R> R update(ID id, com.tangosol.util.function.Remote.BiFunction<? super T, ? super U, ? extends R> updater, U value, com.oracle.coherence.repository.EntityFactory<? super ID, ? extends T> factory) Update an entity using specified updater function, and optionalEntityFactorythat will be used to create entity instance if it doesn't already exist in the repository.<R> RUpdate an entity using specified updater function.<R> Rupdate(ID id, com.tangosol.util.function.Remote.Function<? super T, ? extends R> updater, com.oracle.coherence.repository.EntityFactory<? super ID, ? extends T> factory) Update an entity using specified updater function, and optionalEntityFactorythat will be used to create entity instance if it doesn't already exist in the repository.<U> voidUpdate an entity using specified updater and the new value.<U> voidupdate(ID id, com.tangosol.util.ValueUpdater<? super T, ? super U> updater, U value, com.oracle.coherence.repository.EntityFactory<? super ID, ? extends T> factory) Update an entity using specified updater and the new value, and optionalEntityFactorythat will be used to create entity instance if it doesn't already exist in the repository.updateAll(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.BiFunction<? super T, ? super U, ? extends R> updater, U value) Update multiple entities using specified updater and the new value.updateAll(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.Function<? super T, ? extends R> updater) Update multiple entities using specified updater function.<U> voidupdateAll(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueUpdater<? super T, ? super U> updater, U value) Update multiple entities using specified updater and the new value.
-
Method Details
-
getMap
Return the underlyingNamedMapthat backs thisRepository.- Returns:
- the underlying
NamedMapthat backs thisRepository
-
count
long count() -
count
long count(com.tangosol.util.Filter<?> filter) Return the number of entities in this repository that satisfy specified filter.- Parameters:
filter- the filter to evaluate- Returns:
- the number of entities in this repository that satisfy specified filter
-
delete
-
delete
Delete specified entity.- Parameters:
entity- the entity to removefReturn- the flag specifying whether to return removed entity- Returns:
- removed entity, iff
fReturn == true;nullotherwise
-
deleteAll
void deleteAll() -
deleteAll
Delete specified entities.- Parameters:
colEntities- the entities to remove- Returns:
trueif this repository changed as a result of the call
-
deleteAll
Delete specified entities.- Parameters:
colEntities- the entities to removefReturn- the flag specifying whether to return removed entity- Returns:
- the map of removed entity identifiers as keys, and the removed
entities as values iff
fReturn == true;nullotherwise
-
deleteAll
-
deleteAll
boolean deleteAll(com.tangosol.util.Filter<?> filter) Delete all entities based on the specified criteria.- Parameters:
filter- the criteria that should be used to select entities to remove- Returns:
trueif this repository changed as a result of the call
-
deleteAll
Remove all entities based on the specified criteria.- Parameters:
filter- the criteria that should be used to select entities to removefReturn- the flag specifying whether to return removed entity- Returns:
- the map of removed entity identifiers as keys, and the removed
entities as values iff
fReturn == true;nullotherwise
-
deleteAll
Delete specified entities.- Parameters:
strEntities- the entities to remove- Returns:
trueif this repository changed as a result of the call
-
deleteAll
Delete specified entities.- Parameters:
strEntities- the entities to removefReturn- the flag specifying whether to return removed entity- Returns:
- the map of removed entity identifiers as keys, and the removed
entities as values iff
fReturn == true;nullotherwise
-
deleteAllById
-
deleteAllById
Delete entities with the specified identifiers.- Parameters:
colIds- the identifiers of the entities to remove- Returns:
trueif this repository changed as a result of the call
-
deleteAllById
Delete entities with the specified identifiers.- Parameters:
colIds- the identifiers of the entities to removefReturn- the flag specifying whether to return removed entity- Returns:
- the map of removed entity identifiers as keys, and the removed
entities as values iff
fReturn == true;nullotherwise
-
deleteById
-
existsById
-
findAll
-
findAll
-
findAll
-
findAllById
-
findById
-
get
Return the value extracted from an entity with a given identifier.For example, you could extract
Person'snameattribute by calling a getter on a remotePersonentity instance:people.get(ssn, Person::getName);You could also extract a
Fragmentcontaining thePerson'snameandageattributes by calling corresponding getters on the remotePersonentity instance:Fragment<Person> person = people.get(ssn, Extractors.fragment(Person::getName, Person::getAge)); System.out.println("name: " + person.get(Person::getName)); System.out.println(" age: " + person.get(Person::getAge));Finally, you can also extract nested fragments:
Fragment<Person> person = people.get(ssn, Extractors.fragment(Person::getName, Person::getAge, Extractors.fragment(Person::getAddress, Address::getCity, Address::getState)); System.out.println(" name: " + person.get(Person::getName)); System.out.println(" age: " + person.get(Person::getAge)); Fragment<Address> address = person.getFragment(Person::getAddress); System.out.println(" city: " + address.get(Address::getCity)); System.out.println("state: " + address.get(Address::getState));Note that the actual extraction (via the invocation of the specified getter method) will happen on the primary owner for the specified entity, and only the extracted value will be sent over the network to the client, which can significantly reduce the amount of data transferred.- Type Parameters:
R- the type of the extracted value- Parameters:
id- the entity's identifierextractor- theValueExtractorto extract value with- Returns:
- the extracted value
-
getAll
<R> Map<ID,R> getAll(Collection<? extends ID> colIds, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return a map of values extracted from a set of entities with the given identifiers.- Type Parameters:
R- the type of the extracted values- Parameters:
colIds- the entity identifiersextractor- theValueExtractorto extract values with- Returns:
- the map of extracted values, keyed by entity id
- See Also:
-
getAll
Return all entities that satisfy the specified criteria.- Parameters:
filter- the criteria to evaluate- Returns:
- all entities that satisfy the specified criteria
-
getAll
<R> Map<ID,R> getAll(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return a map of values extracted from a set of entities based on the specified criteria.- Type Parameters:
R- the type of the extracted values- Parameters:
filter- the criteria to use to select entities for extractionextractor- theValueExtractorto extract values with- Returns:
- the map of extracted values, keyed by entity id
- See Also:
-
getAll
Return a map of values extracted from all entities in the repository.- Type Parameters:
R- the type of the extracted values- Parameters:
extractor- theValueExtractorto extract values with- Returns:
- the map of extracted values, keyed by entity id
- See Also:
-
getAllOrderedBy
Collection<T> getAllOrderedBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.Comparator<? super T> orderBy) Return all entities that satisfy the specified criteria, sorted using specifiedRemote.Comparator.- Parameters:
filter- the criteria to evaluateorderBy- the comparator to sort the results with- Returns:
- all entities that satisfy specified criteria, sorted using
specified
Remote.Comparator.
-
getAllOrderedBy
<R extends Comparable<? super R>> Collection<T> getAllOrderedBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> orderBy) Return all entities that satisfy the specified criteria, sorted using specifiedComparableattribute.- Type Parameters:
R- the type of the extracted values- Parameters:
filter- the criteria to evaluateorderBy- theComparableattribute to sort the results by- Returns:
- all entities that satisfy specified criteria, sorted using
specified
Comparableattribute.
-
getAllOrderedBy
Return all entities in this repository, sorted using specifiedRemote.Comparator.- Parameters:
orderBy- the comparator to sort the results with- Returns:
- all entities in this repository, sorted using
specified
Remote.Comparator.
-
getAllOrderedBy
<R extends Comparable<? super R>> Collection<T> getAllOrderedBy(com.tangosol.util.ValueExtractor<? super T, ? extends R> orderBy) Return all entities in this repository, sorted using specifiedComparableattribute.- Type Parameters:
R- the type of the extracted values- Parameters:
orderBy- theComparableattribute to sort the results by- Returns:
- all entities in this repository, sorted using
specified
Comparableattribute.
-
save
-
saveAll
-
saveAll
Store all specified entities as a batch.- Parameters:
strEntities- the entities to store
-
update
Update an entity using specified updater and the new value.For example, you could update
Person'sageattribute by calling a setter on a remotePersonentity instance:people.update(ssn, Person::setAge, 21);Note that the actual update (via the invocation of the specified setter method) will happen on the primary owner for the specified entity, and the updater will have exclusive access to an entity during the execution.- Type Parameters:
U- the type of value to update- Parameters:
id- the entity's identifierupdater- the updater function to usevalue- the value to update entity with, which will be passed as an argument to the updater function
-
update
<U> void update(ID id, com.tangosol.util.ValueUpdater<? super T, ? super U> updater, U value, com.oracle.coherence.repository.EntityFactory<? super ID, ? extends T> factory) Update an entity using specified updater and the new value, and optionalEntityFactorythat will be used to create entity instance if it doesn't already exist in the repository.For example, you could update
Person'sageattribute by calling a setter on a remotePersonentity instance:people.update(ssn, Person::setAge, 21, Person::new);If the person with the specified identifier does not exist, theEntityFactorywill be used to create a new instance. In the example above, it will invoke a constructor on thePersonclass that takes identifier as an argument.Note that the actual update (via the invocation of the specified setter method) will happen on the primary owner for the specified entity, and the updater will have exclusive access to an entity during the execution.
- Type Parameters:
U- the type of value to update- Parameters:
id- the entity's identifierupdater- the updater function to usevalue- the value to update entity with, which will be passed as an argument to the updater functionfactory- the entity factory to use to create new entity instance
-
update
Update an entity using specified updater function.For example, you could increment
Person'sageattribute and return the updatedPersonentity:people.update(ssn, person -> { person.setAge(person.getAge() + 1); return person; });This variant of theupdatemethod offers ultimate flexibility, as it allows you to return any value you want as the result of the invocation, at the cost of typically slightly more complex logic at the call site.Note that the actual update (via the evaluation of the specified function) will happen on the primary owner for the specified entity, and the updater will have exclusive access to an entity during the execution.
- Type Parameters:
R- the type of return value of the updater function- Parameters:
id- the entity's identifierupdater- the updater function to use- Returns:
- the result of updater function evaluation
-
update
<R> R update(ID id, com.tangosol.util.function.Remote.Function<? super T, ? extends R> updater, com.oracle.coherence.repository.EntityFactory<? super ID, ? extends T> factory) Update an entity using specified updater function, and optionalEntityFactorythat will be used to create entity instance if it doesn't already exist in the repository.For example, you could increment
Person'sageattribute and return the updatedPersonentity:people.update(ssn, person -> { person.setAge(person.getAge() + 1); return person; }, Person::new);If the person with the specified identifier does not exist, theEntityFactorywill be used to create a new instance. In the example above, it will invoke a constructor on thePersonclass that takes identifier as an argument.This variant of the
updatemethod offers ultimate flexibility, as it allows you to return any value you want as the result of the invocation, at the cost of typically slightly more complex logic at the call site.Note that the actual update (via the evaluation of the specified function) will happen on the primary owner for the specified entity, and the updater will have exclusive access to an entity during the execution.
- Type Parameters:
R- the type of return value of the updater function- Parameters:
id- the entity's identifierupdater- the updater function to usefactory- the entity factory to use to create new entity instance- Returns:
- the result of updater function evaluation
-
update
<U,R> R update(ID id, com.tangosol.util.function.Remote.BiFunction<? super T, ? super U, ? extends R> updater, U value) Update an entity using specified updater and the new value.Unlike
update(Object, ValueUpdater, Object), which doesn't return anything, this method is typically used to invoke "fluent" methods on the target entity that return entity itself (although they are free to return any value they want).For example, you could use it to add an item to the
ShoppingCartentity and return the updatedShoppingCartinstance in a single call:Item item = ... ShoppingCart cart = carts.update(cartId, ShoppingCart::addItem, item);Note that the actual update (via the invocation of the specified setter method) will happen on the primary owner for the specified entity, and the updater will have exclusive access to an entity during the execution.- Type Parameters:
U- the type of value to updateR- the type of return value of the updater function- Parameters:
id- the entity's identifierupdater- the updater function to usevalue- the value to update entity with, which will be passed as an argument to the updater function- Returns:
- the result of updater function evaluation
-
update
<U,R> R update(ID id, com.tangosol.util.function.Remote.BiFunction<? super T, ? super U, ? extends R> updater, U value, com.oracle.coherence.repository.EntityFactory<? super ID, ? extends T> factory) Update an entity using specified updater function, and optionalEntityFactorythat will be used to create entity instance if it doesn't already exist in the repository.Unlike
update(Object, ValueUpdater, Object), which doesn't return anything, this method is typically used to invoke "fluent" methods on the target entity that return entity itself (although they are free to return any value they want).For example, you could use it to add an item to the
ShoppingCartentity and return the updatedShoppingCartinstance in a single call:Item item = ... ShoppingCart cart = carts.update(cartId, ShoppingCart::addItem, item, ShoppingCart::new);If the cart with the specified identifier does not exist, the specifiedEntityFactorywill be used to create a new instance. In the example above, it will invoke a constructor on theShoppingCartclass that takes identifier as an argument.Note that the actual update (via the evaluation of the specified function) will happen on the primary owner for the specified entity, and the updater will have exclusive access to an entity during the execution.
- Type Parameters:
U- the type of value to updateR- the type of return value of the updater function- Parameters:
id- the entity's identifierupdater- the updater function to usevalue- the value to update entity with, which will be passed as an argument to the updater functionfactory- the entity factory to use to create new entity instance- Returns:
- the result of updater function evaluation
-
updateAll
<U> void updateAll(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueUpdater<? super T, ? super U> updater, U value) Update multiple entities using specified updater and the new value.- Type Parameters:
U- the type of value to update- Parameters:
filter- the criteria to use to select entities to updateupdater- the updater function to usevalue- the value to update each entity with, which will be passed as an argument to the updater function
-
updateAll
<R> Map<ID,R> updateAll(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.Function<? super T, ? extends R> updater) Update multiple entities using specified updater function.- Type Parameters:
R- the type of return value of the updater function- Parameters:
filter- the criteria to use to select entities to updateupdater- the updater function to use- Returns:
- a map of updater function results, keyed by entity id
-
updateAll
<U,R> Map<ID,R> updateAll(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.BiFunction<? super T, ? super U, ? extends R> updater, U value) Update multiple entities using specified updater and the new value.- Type Parameters:
U- the type of value to updateR- the type of return value of the updater function- Parameters:
filter- the criteria to use to select entities to updateupdater- the updater function to usevalue- the value to update each entity with, which will be passed as an argument to the updater function- Returns:
- a map of updater function results, keyed by entity id
-
stream
com.tangosol.util.stream.RemoteStream<T> stream()Return a stream of all entities in this repository.- Returns:
- a stream of all entities in this repository
-
stream
Return a stream of entities with the specified identifiers.- Parameters:
colIds- the identifiers of the entities to include in the returned stream- Returns:
- a stream of entities for the specified identifiers
-
stream
Return a stream of all entities in this repository that satisfy the specified criteria.- Parameters:
filter- the criteria an entity must satisfy in order to be included in the returned stream- Returns:
- a stream of entities that satisfy the specified criteria
-
average
Return the average of the specified function.- Parameters:
extractor- the function to average; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the average of the specified function
-
average
double average(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor) Return the average of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to average; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the average of the specified function
-
average
Return the average of the specified function.- Parameters:
extractor- the function to average; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the average of the specified function
-
average
double average(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor) Return the average of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to average; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the average of the specified function
-
average
Return the average of the specified function.- Parameters:
extractor- the function to average; typically a method reference on the entity class, such asPerson::getWeight- Returns:
- the average of the specified function
-
average
double average(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor) Return the average of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to average; typically a method reference on the entity class, such asPerson::getWeight- Returns:
- the average of the specified function
-
average
Return the average of the specified function.- Parameters:
extractor- the function to average; typically a method reference on the entity class, such asPerson::getSalary- Returns:
- the average of the specified function
-
average
BigDecimal average(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor) Return the average of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to average; typically a method reference on the entity class, such asPerson::getSalary- Returns:
- the average of the specified function
-
distinct
<R> Collection<? extends R> distinct(com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return the set of distinct values for the specified extractor.- Type Parameters:
R- the type of extracted values- Parameters:
extractor- the extractor to get a value from; typically a method reference on the entity class, such asPerson::getName- Returns:
- the set of distinct values for the specified extractor
-
distinct
<R> Collection<? extends R> distinct(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return the set of distinct values for the specified extractor.- Type Parameters:
R- the type of extracted values- Parameters:
filter- the entity selection criteriaextractor- the extractor to get a value from;- Returns:
- the set of distinct values for the specified extractor
-
groupBy
Return the grouping of entities by the specified extractor.- Type Parameters:
K- the type of extracted grouping keys- Parameters:
extractor- the extractor to get a grouping value from; typically a method reference on the entity class, such asPerson::getGender- Returns:
- the the grouping of entities by the specified extractor; the keys
in the returned map will be distinct values extracted by the
specified
extractor, and the values will be sets of entities that match each extracted key
-
groupBy
<K> Map<K,SortedSet<T>> groupBy(com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.function.Remote.Comparator<? super T> orderBy) Return the grouping of entities by the specified extractor, ordered by the specified attribute within each group.- Type Parameters:
K- the type of extracted grouping keys- Parameters:
extractor- the extractor to get a grouping value from; typically a method reference on the entity class, such asPerson::getGenderorderBy- theRemote.Comparatorto sort the results within each group by- Returns:
- the the grouping of entities by the specified extractor; the keys
in the returned map will be distinct values extracted by the
specified
extractor, and the values will be sorted sets of entities that match each extracted key
-
groupBy
<K> Map<K,Set<T>> groupBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor) Return the grouping of entities by the specified extractor.- Type Parameters:
K- the type of extracted grouping keys- Parameters:
filter- the entity selection criteriaextractor- the extractor to get a grouping value from; typically a method reference on the entity class, such asPerson::getGender- Returns:
- the the grouping of entities by the specified extractor; the keys
in the returned map will be distinct values extracted by the
specified
extractor, and the values will be sets of entities that match each extracted key
-
groupBy
<K> Map<K,SortedSet<T>> groupBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.function.Remote.Comparator<? super T> orderBy) Return the grouping of entities by the specified extractor, ordered by the specified attribute within each group.- Type Parameters:
K- the type of extracted grouping keys- Parameters:
filter- the entity selection criteriaextractor- the extractor to get a grouping value from; typically a method reference on the entity class, such asPerson::getGenderorderBy- theRemote.Comparatorto sort the results within each group by- Returns:
- the the grouping of entities by the specified extractor; the keys
in the returned map will be distinct values extracted by the
specified
extractor, and the values will be sorted sets of entities that match each extracted key
-
groupBy
<K,A, Map<K,R> R> groupBy(com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.stream.RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.- Type Parameters:
K- the type of extracted grouping keysA- the type of collector's accumulatorR- the type of collector's result- Parameters:
extractor- the extractor to get a grouping value from; typically a method reference on the entity class, such asPerson::getGendercollector- theRemoteCollectorto apply to grouped entities- Returns:
- the the grouping of entities by the specified extractor; the keys
in the returned map will be distinct values extracted by the
specified
extractor, and the values will be results of the specifiedcollectorfor each group - See Also:
-
RemoteCollectors
-
groupBy
<K,A, Map<K,R> R> groupBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.stream.RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.- Type Parameters:
K- the type of extracted grouping keysA- the type of collector's accumulatorR- the type of collector's result- Parameters:
filter- the entity selection criteriaextractor- the extractor to get a grouping value from; typically a method reference on the entity class, such asPerson::getGendercollector- theRemoteCollectorto apply to grouped entities- Returns:
- the the grouping of entities by the specified extractor; the keys
in the returned map will be distinct values extracted by the
specified
extractor, and the values will be results of the specifiedcollectorfor each group - See Also:
-
RemoteCollectors
-
groupBy
<K,A, M groupByR, M extends Map<K, R>> (com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.function.Remote.Supplier<M> mapFactory, com.tangosol.util.stream.RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.- Type Parameters:
K- the type of extracted grouping keysA- the type of collector's accumulatorR- the type of collector's resultM- the type of resultMap- Parameters:
extractor- the extractor to get a grouping value from; typically a method reference on the entity class, such asPerson::getGendermapFactory- the supplier to use to create resultMapcollector- theRemoteCollectorto apply to grouped entities- Returns:
- the the grouping of entities by the specified extractor; the keys
in the returned map will be distinct values extracted by the
specified
extractor, and the values will be results of the specifiedcollectorfor each group - See Also:
-
RemoteCollectors
-
groupBy
<K,A, M groupByR, M extends Map<K, R>> (com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends K> extractor, com.tangosol.util.function.Remote.Supplier<M> mapFactory, com.tangosol.util.stream.RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.- Type Parameters:
K- the type of extracted grouping keysA- the type of collector's accumulatorR- the type of collector's resultM- the type of resultMap- Parameters:
filter- the entity selection criteriaextractor- the extractor to get a grouping value from; typically a method reference on the entity class, such asPerson::getGendermapFactory- the supplier to use to create resultMapcollector- theRemoteCollectorto apply to grouped entities- Returns:
- the the grouping of entities by the specified extractor; the keys
in the returned map will be distinct values extracted by the
specified
extractor, and the values will be results of the specifiedcollectorfor each group - See Also:
-
RemoteCollectors
-
max
Return the maximum value of the specified function.- Parameters:
extractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the maximum value of the specified function
-
max
int max(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor) Return the maximum value of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the maximum value of the specified function
-
max
Return the maximum value of the specified function.- Parameters:
extractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the maximum value of the specified function
-
max
long max(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor) Return the maximum value of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the maximum value of the specified function
-
max
Return the maximum value of the specified function.- Parameters:
extractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getWeight- Returns:
- the maximum value of the specified function
-
max
double max(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor) Return the maximum value of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getWeight- Returns:
- the maximum value of the specified function
-
max
Return the maximum value of the specified function.- Parameters:
extractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getSalary- Returns:
- the maximum value of the specified function
-
max
BigDecimal max(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor) Return the maximum value of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getSalary- Returns:
- the maximum value of the specified function
-
max
<R extends Comparable<? super R>> R max(com.tangosol.util.function.Remote.ToComparableFunction<? super T, R> extractor) Return the maximum value of the specified function.- Type Parameters:
R- the type of the extracted values- Parameters:
extractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getName- Returns:
- the maximum value of the specified function
-
max
<R extends Comparable<? super R>> R max(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToComparableFunction<? super T, R> extractor) Return the maximum value of the specified function.- Type Parameters:
R- the type of the extracted values- Parameters:
filter- the entity selection criteriaextractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getName- Returns:
- the maximum value of the specified function
-
maxBy
<R extends Comparable<? super R>> Optional<T> maxBy(com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return the entity with the maximum value of the specified function.- Type Parameters:
R- the type of the extracted values- Parameters:
extractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the entity with the maximum value of the specified function
-
maxBy
<R extends Comparable<? super R>> Optional<T> maxBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return the entity with the maximum value of the specified function.- Type Parameters:
R- the type of the extracted values- Parameters:
filter- the entity selection criteriaextractor- the function to determine the maximum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the entity with the maximum value of the specified function
-
min
Return the minimum value of the specified function.- Parameters:
extractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the minimum value of the specified function
-
min
int min(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor) Return the minimum value of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the minimum value of the specified function
-
min
Return the minimum value of the specified function.- Parameters:
extractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the minimum value of the specified function
-
min
long min(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor) Return the minimum value of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the minimum value of the specified function
-
min
Return the minimum value of the specified function.- Parameters:
extractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getWeight- Returns:
- the minimum value of the specified function
-
min
double min(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor) Return the minimum value of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getWeight- Returns:
- the minimum value of the specified function
-
min
Return the minimum value of the specified function.- Parameters:
extractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getSalary- Returns:
- the minimum value of the specified function
-
min
BigDecimal min(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor) Return the minimum value of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getSalary- Returns:
- the minimum value of the specified function
-
min
<R extends Comparable<? super R>> R min(com.tangosol.util.function.Remote.ToComparableFunction<? super T, R> extractor) Return the minimum value of the specified function.- Type Parameters:
R- the type of the extracted values- Parameters:
extractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getName- Returns:
- the minimum value of the specified function
-
min
<R extends Comparable<? super R>> R min(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToComparableFunction<? super T, R> extractor) Return the minimum value of the specified function.- Type Parameters:
R- the type of the extracted values- Parameters:
filter- the entity selection criteriaextractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getName- Returns:
- the minimum value of the specified function
-
minBy
<R extends Comparable<? super R>> Optional<T> minBy(com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return the entity with the minimum value of the specified function.- Type Parameters:
R- the type of the extracted values- Parameters:
extractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the entity with the minimum value of the specified function
-
minBy
<R extends Comparable<? super R>> Optional<T> minBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor) Return the entity with the minimum value of the specified function.- Type Parameters:
R- the type of the extracted values- Parameters:
filter- the entity selection criteriaextractor- the function to determine the minimum value for; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the entity with the minimum value of the specified function
-
sum
Return the sum of the specified function.- Parameters:
extractor- the function to sum; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the sum of the specified function
-
sum
long sum(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor) Return the sum of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to sum; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the sum of the specified function
-
sum
Return the sum of the specified function.- Parameters:
extractor- the function to sum; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the sum of the specified function
-
sum
long sum(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor) Return the sum of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to sum; typically a method reference on the entity class, such asPerson::getAge- Returns:
- the sum of the specified function
-
sum
Return the sum of the specified function.- Parameters:
extractor- the function to sum; typically a method reference on the entity class, such asPerson::getWeight- Returns:
- the sum of the specified function
-
sum
double sum(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor) Return the sum of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to sum; typically a method reference on the entity class, such asPerson::getWeight- Returns:
- the sum of the specified function
-
sum
Return the sum of the specified function.- Parameters:
extractor- the function to sum; typically a method reference on the entity class, such asPerson::getSalary- Returns:
- the sum of the specified function
-
sum
BigDecimal sum(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor) Return the sum of the specified function.- Parameters:
filter- the entity selection criteriaextractor- the function to sum; typically a method reference on the entity class, such asPerson::getSalary- Returns:
- the sum of the specified function
-
top
<R extends Comparable<? super R>> List<R> top(com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor, int cResults) Return the top N highest values for the specified extractor.- Type Parameters:
R- the type of the extracted result- Parameters:
extractor- the extractor to get the values to compare withcResults- the number of highest values to return- Returns:
- the top N highest values for the specified extractor
-
top
<R extends Comparable<? super R>> List<R> top(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor, int cResults) Return the top N highest values for the specified extractor.- Type Parameters:
R- the type of the extracted result- Parameters:
filter- the entity selection criteriaextractor- the extractor to get the values to compare withcResults- the number of highest values to return- Returns:
- the top N highest values for the specified extractor
-
top
<R> List<R> top(com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor, com.tangosol.util.function.Remote.Comparator<? super R> comparator, int cResults) Return the top N highest values for the specified extractor.- Type Parameters:
R- the type of the extracted result- Parameters:
extractor- the extractor to get the values to compare withcomparator- the comparator to use when comparing extracted valuescResults- the number of highest values to return- Returns:
- the top N highest values for the specified extractor
-
top
<R> List<R> top(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor, com.tangosol.util.function.Remote.Comparator<? super R> comparator, int cResults) Return the top N highest values for the specified extractor.- Type Parameters:
R- the type of the extracted result- Parameters:
filter- the entity selection criteriaextractor- the extractor to get the values to compare withcomparator- the comparator to use when comparing extracted valuescResults- the number of highest values to return- Returns:
- the top N highest values for the specified extractor
-
topBy
<R extends Comparable<? super R>> List<T> topBy(com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor, int cResults) Return the top N entities with the highest values for the specified extractor.- Type Parameters:
R- the type of the extracted result- Parameters:
extractor- the extractor to get the values to compare withcResults- the number of highest values to return- Returns:
- the top N entities with the highest values for the specified extractor
-
topBy
<R extends Comparable<? super R>> List<T> topBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T, ? extends R> extractor, int cResults) Return the top N entities with the highest values for the specified extractor.- Type Parameters:
R- the type of values used for comparison- Parameters:
filter- the entity selection criteriaextractor- the extractor to get the values to compare withcResults- the number of highest values to return- Returns:
- the top N entities with the highest values for the specified extractor
-
topBy
Return the top N entities with the highest values for the specified extractor.- Parameters:
comparator- the comparator to use when comparing extracted valuescResults- the number of highest values to return- Returns:
- the top N entities with the highest values for the specified extractor
-
topBy
List<T> topBy(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.Comparator<? super T> comparator, int cResults) Return the top N entities with the highest values for the specified extractor.- Parameters:
filter- the entity selection criteriacomparator- the comparator to use when comparing extracted valuescResults- the number of highest values to return- Returns:
- the top N entities with the highest values for the specified extractor
-
addListener
void addListener(com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Description copied from interface:ListenerSupportRegister a listener that will observe all repository events.- Specified by:
addListenerin interfaceListenerSupport<T,ID> - Parameters:
listener- the event listener to register
-
removeListener
void removeListener(com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Description copied from interface:ListenerSupportUnregister a listener that observes all repository events.- Specified by:
removeListenerin interfaceListenerSupport<T,ID> - Parameters:
listener- the event listener to unregister
-
addListener
void addListener(ID id, com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Description copied from interface:ListenerSupportRegister a listener that will observe all events for a specific entity.- Specified by:
addListenerin interfaceListenerSupport<T,ID> - Parameters:
id- the identifier of the entity to observelistener- the event listener to register
-
removeListener
void removeListener(ID id, com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Description copied from interface:ListenerSupportUnregister a listener that observes all events for a specific entity.- Specified by:
removeListenerin interfaceListenerSupport<T,ID> - Parameters:
id- the identifier of the entity to observelistener- the event listener to unregister
-
addListener
void addListener(com.tangosol.util.Filter<?> filter, com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Description copied from interface:ListenerSupportRegister a listener that will observe all events for entities that satisfy the specified criteria.- Specified by:
addListenerin interfaceListenerSupport<T,ID> - Parameters:
filter- the criteria to use to select entities to observelistener- the event listener to register
-
removeListener
void removeListener(com.tangosol.util.Filter<?> filter, com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener) Description copied from interface:ListenerSupportUnregister a listener that observes all events for entities that satisfy the specified criteria.- Specified by:
removeListenerin interfaceListenerSupport<T,ID> - Parameters:
filter- the criteria to use to select entities to observelistener- the event listener to unregister
-
listener
com.oracle.coherence.repository.AbstractRepositoryBase.Listener.Builder<T> listener()Description copied from interface:ListenerSupportCreate newAbstractRepositoryBase.Listener.Builderinstance.- Specified by:
listenerin interfaceListenerSupport<T,ID> - Returns:
- a new
AbstractRepositoryBase.Listener.Builderinstance
-