Interface CoherenceAsyncRepository<T,​ID>

  • Type Parameters:
    T - the domain type the repository manages
    ID - the type of the id of the entity the repository manages
    All Superinterfaces:
    AsyncCrudRepository<T,​ID>, ListenerSupport<T,​ID>, org.springframework.data.repository.Repository<T,​ID>

    public interface CoherenceAsyncRepository<T,​ID>
    extends AsyncCrudRepository<T,​ID>, ListenerSupport<T,​ID>
    Coherence-specific asynchronous repository interface.
    Since:
    3.0
    Author:
    Ryan Lubke
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addListener​(com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener)
      Register a listener that will observe all repository events.
      void addListener​(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.
      void addListener​(ID id, com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener)
      Register a listener that will observe all events for a specific entity.
      java.util.concurrent.CompletableFuture<java.math.BigDecimal> average​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor)
      Return the average of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Double> average​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
      Return the average of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Double> average​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
      Return the average of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Double> average​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
      Return the average of the specified function.
      java.util.concurrent.CompletableFuture<java.math.BigDecimal> average​(com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor)
      Return the average of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Double> average​(com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
      Return the average of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Double> average​(com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
      Return the average of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Double> average​(com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
      Return the average of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Long> count()
      Returns the number of entities available.
      java.util.concurrent.CompletableFuture<java.lang.Long> count​(com.tangosol.util.Filter<?> filter)
      Return the number of entities in this repository that satisfy specified filter.
      java.util.concurrent.CompletableFuture<java.lang.Void> delete​(T entity)
      Deletes a given entity.
      java.util.concurrent.CompletableFuture<T> delete​(T entity, boolean fReturn)
      Delete the specified entity.
      java.util.concurrent.CompletableFuture<java.lang.Void> deleteAll()
      Deletes all entities managed by the repository.
      java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteAll​(com.tangosol.util.Filter<?> filter)
      Remove all entities based on the specified criteria.
      java.util.concurrent.CompletableFuture<java.util.Map<ID,​T>> deleteAll​(com.tangosol.util.Filter<?> filter, boolean fReturn)
      Remove all entities based on the specified criteria.
      java.util.concurrent.CompletableFuture<java.lang.Void> deleteAll​(java.lang.Iterable<? extends T> entities)
      Deletes the given entities.
      java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteAll​(java.util.Collection<? extends T> colEntities)
      Remove the specified entities.
      java.util.concurrent.CompletableFuture<java.util.Map<ID,​T>> deleteAll​(java.util.Collection<? extends T> colEntities, boolean fReturn)
      Remove the specified entities.
      java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteAll​(java.util.stream.Stream<? extends T> strEntities)
      Remove the specified entities.
      java.util.concurrent.CompletableFuture<java.util.Map<ID,​T>> deleteAll​(java.util.stream.Stream<? extends T> strEntities, boolean fReturn)
      Remove the specified entities.
      java.util.concurrent.CompletableFuture<java.lang.Void> deleteAllById​(java.lang.Iterable<? extends ID> ids)
      Deletes all instances of the type T with the given IDs.
      java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteAllById​(java.util.Collection<? extends ID> colIds)
      Remove entities with the specified identifiers.
      java.util.concurrent.CompletableFuture<java.util.Map<ID,​T>> deleteAllById​(java.util.Collection<? extends ID> colIds, boolean fReturn)
      Remove entities with the specified identifiers.
      java.util.concurrent.CompletableFuture<java.lang.Void> deleteById​(ID id)
      Deletes the entity with the given id.
      java.util.concurrent.CompletableFuture<T> deleteById​(ID id, boolean fReturn)
      Remove the entity with a specified identifier.
      <R> java.util.concurrent.CompletableFuture<java.util.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> java.util.concurrent.CompletableFuture<java.util.Collection<? extends R>> distinct​(com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor)
      Return the set of distinct values for the specified extractor.
      java.util.concurrent.CompletableFuture<java.lang.Boolean> existsById​(ID id)
      Returns whether an entity with the given id exists.
      java.util.concurrent.CompletableFuture<java.lang.Iterable<T>> findAll()
      Returns all instances of the type.
      java.util.concurrent.CompletableFuture<java.lang.Iterable<T>> findAllById​(java.lang.Iterable<ID> ids)
      Returns all instances of the type T with the given IDs.
      java.util.concurrent.CompletableFuture<java.util.Optional<T>> findById​(ID id)
      Retrieves an entity by its id.
      <R> java.util.concurrent.CompletableFuture<R> get​(ID id, com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor)
      Return the value extracted from an entity with a given identifier.
      java.util.concurrent.CompletableFuture<java.util.Collection<T>> getAll​(com.tangosol.util.Filter<?> filter)
      Return all entities that satisfy the specified criteria.
      <R> java.util.concurrent.CompletableFuture<java.util.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.
      <R> java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(com.tangosol.util.Filter<?> filter, com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor, java.util.function.BiConsumer<? super ID,​? super R> callback)
      Streams the id and the associated extracted value from a set of entities based on the specified criteria.
      java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(com.tangosol.util.Filter<?> filter, java.util.function.Consumer<? super T> callback)
      Stream all entities that satisfy the specified criteria.
      <R> java.util.concurrent.CompletableFuture<java.util.Map<ID,​R>> getAll​(com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor)
      Return a map of values extracted from all entities in the repository.
      <R> java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor, java.util.function.BiConsumer<? super ID,​? super R> callback)
      Streams the id and the associated extracted value from all entities in the repository.
      <R> java.util.concurrent.CompletableFuture<java.util.Map<ID,​R>> getAll​(java.util.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.
      <R> java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(java.util.Collection<? extends ID> colIds, com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor, java.util.function.BiConsumer<? super ID,​? super R> callback)
      Stream the entities associated with the specified ids to the provided callback.
      java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(java.util.Collection<? extends ID> colIds, java.util.function.Consumer<? super T> callback)
      Stream the entities associated with the specified ids to the provided callback.
      java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(java.util.function.Consumer<? super T> callback)
      Stream all entities all entities in this repository.
      java.util.concurrent.CompletableFuture<java.util.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 specified Remote.Comparator.
      <R extends java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<java.util.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 specified Comparable attribute.
      java.util.concurrent.CompletableFuture<java.util.Collection<T>> getAllOrderedBy​(com.tangosol.util.function.Remote.Comparator<? super T> orderBy)
      Return all entities in this repository, sorted using specified Remote.Comparator.
      <R extends java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<java.util.Collection<T>>
      getAllOrderedBy​(com.tangosol.util.ValueExtractor<? super T,​? extends R> orderBy)
      Return all entities in this repository, sorted using specified Comparable attribute.
      com.tangosol.net.AsyncNamedMap<ID,​T> getMap()
      Return the underlying AsyncNamedMap that backs this Repository.
      <K> java.util.concurrent.CompletableFuture<java.util.Map<K,​java.util.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.
      <K> java.util.concurrent.CompletableFuture<java.util.Map<K,​java.util.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.
      <K,​A,​R,​M extends java.util.Map<K,​R>>
      java.util.concurrent.CompletableFuture<M>
      groupBy​(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>
      java.util.concurrent.CompletableFuture<java.util.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.
      <K> java.util.concurrent.CompletableFuture<java.util.Map<K,​java.util.Set<T>>> groupBy​(com.tangosol.util.ValueExtractor<? super T,​? extends K> extractor)
      Return the grouping of entities by the specified extractor.
      <K> java.util.concurrent.CompletableFuture<java.util.Map<K,​java.util.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.
      <K,​A,​R,​M extends java.util.Map<K,​R>>
      java.util.concurrent.CompletableFuture<M>
      groupBy​(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>
      java.util.concurrent.CompletableFuture<java.util.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 new AbstractRepositoryBase.Listener.Builder instance.
      java.util.concurrent.CompletableFuture<java.math.BigDecimal> 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 java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<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.
      java.util.concurrent.CompletableFuture<java.lang.Double> max​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
      Return the maximum value of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Integer> max​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
      Return the maximum value of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Long> max​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
      Return the maximum value of the specified function.
      java.util.concurrent.CompletableFuture<java.math.BigDecimal> max​(com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor)
      Return the maximum value of the specified function.
      <R extends java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<R>
      max​(com.tangosol.util.function.Remote.ToComparableFunction<? super T,​R> extractor)
      Return the maximum value of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Double> max​(com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
      Return the maximum value of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Integer> max​(com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
      Return the maximum value of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Long> max​(com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
      Return the maximum value of the specified function.
      <R extends java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<java.util.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 java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<java.util.Optional<T>>
      maxBy​(com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor)
      Return the entity with the maximum value of the specified function.
      java.util.concurrent.CompletableFuture<java.math.BigDecimal> 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 java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<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.
      java.util.concurrent.CompletableFuture<java.lang.Double> min​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
      Return the minimum value of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Integer> min​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
      Return the minimum value of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Long> min​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
      Return the minimum value of the specified function.
      java.util.concurrent.CompletableFuture<java.math.BigDecimal> min​(com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor)
      Return the minimum value of the specified function.
      <R extends java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<R>
      min​(com.tangosol.util.function.Remote.ToComparableFunction<? super T,​R> extractor)
      Return the minimum value of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Double> min​(com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
      Return the minimum value of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Integer> min​(com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
      Return the minimum value of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Long> min​(com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
      Return the minimum value of the specified function.
      <R extends java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<java.util.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 java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<java.util.Optional<T>>
      minBy​(com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor)
      Return the entity with the minimum value of the specified function.
      void removeListener​(com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener)
      Unregister a listener that observes all repository events.
      void removeListener​(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.
      void removeListener​(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>
      java.util.concurrent.CompletableFuture<S>
      save​(S entity)
      Saves a given entity.
      <S extends T>
      java.util.concurrent.CompletableFuture<java.lang.Iterable<S>>
      saveAll​(java.lang.Iterable<S> entities)
      Saves all given entities.
      java.util.concurrent.CompletableFuture<java.lang.Void> saveAll​(java.util.stream.Stream<? extends T> strEntities)
      Store all specified entities as a batch.
      java.util.concurrent.CompletableFuture<java.math.BigDecimal> sum​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor)
      Return the sum of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Double> sum​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
      Return the sum of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Long> sum​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
      Return the sum of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Long> sum​(com.tangosol.util.Filter<?> filter, com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
      Return the sum of the specified function.
      java.util.concurrent.CompletableFuture<java.math.BigDecimal> sum​(com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor)
      Return the sum of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Double> sum​(com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
      Return the sum of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Long> sum​(com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
      Return the sum of the specified function.
      java.util.concurrent.CompletableFuture<java.lang.Long> sum​(com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
      Return the sum of the specified function.
      <R extends java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<java.util.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> java.util.concurrent.CompletableFuture<java.util.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 java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<java.util.List<R>>
      top​(com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor, int cResults)
      Return the top N highest values for the specified extractor.
      <R> java.util.concurrent.CompletableFuture<java.util.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.
      java.util.concurrent.CompletableFuture<java.util.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.
      <R extends java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<java.util.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.
      java.util.concurrent.CompletableFuture<java.util.List<T>> topBy​(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 java.lang.Comparable<? super R>>
      java.util.concurrent.CompletableFuture<java.util.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.
      <U,​R>
      java.util.concurrent.CompletableFuture<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>
      java.util.concurrent.CompletableFuture<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 optional EntityFactory that will be used to create entity instance if it doesn't already exist in the repository.
      <R> java.util.concurrent.CompletableFuture<R> update​(ID id, com.tangosol.util.function.Remote.Function<? super T,​? extends R> updater)
      Update an entity using specified updater function.
      <R> java.util.concurrent.CompletableFuture<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 optional EntityFactory that will be used to create entity instance if it doesn't already exist in the repository.
      <U> java.util.concurrent.CompletableFuture<java.lang.Void> update​(ID id, com.tangosol.util.ValueUpdater<? super T,​? super U> updater, U value)
      Update an entity using specified updater and the new value.
      <U> java.util.concurrent.CompletableFuture<java.lang.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 optional EntityFactory that will be used to create entity instance if it doesn't already exist in the repository.
      <U,​R>
      java.util.concurrent.CompletableFuture<java.util.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.
      <R> java.util.concurrent.CompletableFuture<java.util.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.
      <U> java.util.concurrent.CompletableFuture<java.lang.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.
    • Method Detail

      • getMap

        com.tangosol.net.AsyncNamedMap<ID,​T> getMap()
        Return the underlying AsyncNamedMap that backs this Repository.
        Returns:
        the underlying AsyncNamedMap that backs this Repository
      • count

        java.util.concurrent.CompletableFuture<java.lang.Long> count()
        Description copied from interface: AsyncCrudRepository
        Returns the number of entities available.
        Specified by:
        count in interface AsyncCrudRepository<T,​ID>
        Returns:
        the number of entities
      • count

        java.util.concurrent.CompletableFuture<java.lang.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:
        a CompletableFuture that will resolve to the number of entities in this repository that satisfy specified filter
      • delete

        java.util.concurrent.CompletableFuture<java.lang.Void> delete​(T entity)
        Description copied from interface: AsyncCrudRepository
        Deletes a given entity.
        Specified by:
        delete in interface AsyncCrudRepository<T,​ID>
        Parameters:
        entity - must not be null
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
      • delete

        java.util.concurrent.CompletableFuture<T> delete​(T entity,
                                                         boolean fReturn)
        Delete the specified entity.
        Parameters:
        entity - the entity to remove
        fReturn - the flag specifying whether to return removed entity
        Returns:
        a CompletableFuture that will resolve to the removed entity, iff fReturn == true; null otherwise
      • deleteAll

        java.util.concurrent.CompletableFuture<java.lang.Void> deleteAll()
        Deletes all entities managed by the repository.
        Specified by:
        deleteAll in interface AsyncCrudRepository<T,​ID>
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
      • deleteAll

        java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteAll​(java.util.Collection<? extends T> colEntities)
        Remove the specified entities.
        Parameters:
        colEntities - the entities to remove
        Returns:
        a CompletableFuture that will resolve to true if this repository changed as a result of the call
      • deleteAll

        java.util.concurrent.CompletableFuture<java.util.Map<ID,​T>> deleteAll​(java.util.Collection<? extends T> colEntities,
                                                                                    boolean fReturn)
        Remove the specified entities.
        Parameters:
        colEntities - the entities to remove
        fReturn - the flag specifying whether to return removed entity
        Returns:
        a CompletableFuture that will resolve to a map of removed entity identifiers as keys, and the removed entities as values iff fReturn == true; null otherwise
      • deleteAll

        java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteAll​(com.tangosol.util.Filter<?> filter)
        Remove all entities based on the specified criteria.
        Parameters:
        filter - the criteria that should be used to select entities to remove
        Returns:
        a CompletableFuture that will resolve to true if this repository changed as a result of the call
      • deleteAll

        java.util.concurrent.CompletableFuture<java.util.Map<ID,​T>> deleteAll​(com.tangosol.util.Filter<?> filter,
                                                                                    boolean fReturn)
        Remove all entities based on the specified criteria.
        Parameters:
        filter - the criteria that should be used to select entities to remove
        fReturn - the flag specifying whether to return removed entity
        Returns:
        a CompletableFuture that will resolve to a map of removed entity identifiers as keys, and the removed entities as values iff fReturn == true; null otherwise
      • deleteAll

        java.util.concurrent.CompletableFuture<java.lang.Void> deleteAll​(java.lang.Iterable<? extends T> entities)
        Description copied from interface: AsyncCrudRepository
        Deletes the given entities.
        Specified by:
        deleteAll in interface AsyncCrudRepository<T,​ID>
        Parameters:
        entities - must not be null. Must not contain null elements
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
      • deleteAll

        java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteAll​(java.util.stream.Stream<? extends T> strEntities)
        Remove the specified entities.
        Parameters:
        strEntities - the entities to remove
        Returns:
        a CompletableFuture that will resolve to true if this repository changed as a result of the call
      • deleteAll

        java.util.concurrent.CompletableFuture<java.util.Map<ID,​T>> deleteAll​(java.util.stream.Stream<? extends T> strEntities,
                                                                                    boolean fReturn)
        Remove the specified entities.
        Parameters:
        strEntities - the entities to remove
        fReturn - the flag specifying whether to return removed entity
        Returns:
        a CompletableFuture that will resolve to a map of removed entity identifiers as keys, and the removed entities as values iff fReturn == true; null otherwise
      • deleteAllById

        java.util.concurrent.CompletableFuture<java.lang.Void> deleteAllById​(java.lang.Iterable<? extends ID> ids)
        Description copied from interface: AsyncCrudRepository
        Deletes all instances of the type T with the given IDs.
        Specified by:
        deleteAllById in interface AsyncCrudRepository<T,​ID>
        Parameters:
        ids - must not be null. Must not contain null elements
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
      • deleteAllById

        java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteAllById​(java.util.Collection<? extends ID> colIds)
        Remove entities with the specified identifiers.
        Parameters:
        colIds - the identifiers of the entities to remove
        Returns:
        a CompletableFuture that will resolve to true if this repository changed as a result of the call
      • deleteAllById

        java.util.concurrent.CompletableFuture<java.util.Map<ID,​T>> deleteAllById​(java.util.Collection<? extends ID> colIds,
                                                                                        boolean fReturn)
        Remove entities with the specified identifiers.
        Parameters:
        colIds - the identifiers of the entities to remove
        fReturn - the flag specifying whether to return removed entity
        Returns:
        a CompletableFuture that will resolve to a map of removed entity identifiers as keys, and the removed entities as values iff fReturn == true; null otherwise
      • deleteById

        java.util.concurrent.CompletableFuture<java.lang.Void> deleteById​(ID id)
        Description copied from interface: AsyncCrudRepository
        Deletes the entity with the given id.
        Specified by:
        deleteById in interface AsyncCrudRepository<T,​ID>
        Parameters:
        id - must not be null
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
      • deleteById

        java.util.concurrent.CompletableFuture<T> deleteById​(ID id,
                                                             boolean fReturn)
        Remove the entity with a specified identifier.
        Parameters:
        id - the identifier of an entity to remove
        fReturn - the flag specifying whether to return removed entity
        Returns:
        a CompletableFuture that will resolve to the removed entity, iff fReturn == true; null otherwise
      • existsById

        java.util.concurrent.CompletableFuture<java.lang.Boolean> existsById​(ID id)
        Description copied from interface: AsyncCrudRepository
        Returns whether an entity with the given id exists.
        Specified by:
        existsById in interface AsyncCrudRepository<T,​ID>
        Parameters:
        id - must not be null
        Returns:
        true if an entity with the given id exists, false otherwise
      • findById

        java.util.concurrent.CompletableFuture<java.util.Optional<T>> findById​(ID id)
        Description copied from interface: AsyncCrudRepository
        Retrieves an entity by its id.
        Specified by:
        findById in interface AsyncCrudRepository<T,​ID>
        Parameters:
        id - must not be null
        Returns:
        the entity with the given id or Optional#empty() if none found
      • findAll

        java.util.concurrent.CompletableFuture<java.lang.Iterable<T>> findAll()
        Description copied from interface: AsyncCrudRepository
        Returns all instances of the type.
        Specified by:
        findAll in interface AsyncCrudRepository<T,​ID>
        Returns:
        all entities
      • findAllById

        java.util.concurrent.CompletableFuture<java.lang.Iterable<T>> findAllById​(java.lang.Iterable<ID> ids)
        Description copied from interface: AsyncCrudRepository
        Returns all instances of the type T with the given IDs.

        If some or all ids are not found, no entities are returned for these IDs.

        Note that the order of elements in the result is not guaranteed.

        Specified by:
        findAllById in interface AsyncCrudRepository<T,​ID>
        Parameters:
        ids - must not be null nor contain any null values
        Returns:
        guaranteed to be not null. The size can be equal or less than the number of given ids
      • get

        <R> java.util.concurrent.CompletableFuture<R> get​(ID id,
                                                          com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor)
        Return the value extracted from an entity with a given identifier.

        For example, you could extract Person's name attribute by calling a getter on a remote Person entity instance:

             people.get(ssn, Person::getName);
         
        You could also extract a Fragment containing the Person's name and age attributes by calling corresponding getters on the remote Person entity 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 identifier
        extractor - the ValueExtractor to extract value with
        Returns:
        a CompletableFuture that will resolve to the extracted value
      • getAll

        java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(java.util.function.Consumer<? super T> callback)
        Stream all entities all entities in this repository.
        Parameters:
        callback - a consumer of results as they become available
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
        See Also:
        findAll()
      • getAll

        java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(java.util.Collection<? extends ID> colIds,
                                                                      java.util.function.Consumer<? super T> callback)
        Stream the entities associated with the specified ids to the provided callback.
        Parameters:
        colIds - a Collection of ids that may be present in this repository
        callback - a consumer of results as they become available
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
        See Also:
        findAllById(Iterable)
      • getAll

        <R> java.util.concurrent.CompletableFuture<java.util.Map<ID,​R>> getAll​(java.util.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 identifiers
        extractor - the ValueExtractor to extract values with
        Returns:
        a CompletableFuture that will resolve to a map of extracted values, keyed by entity id
        See Also:
        get(Object, ValueExtractor)
      • getAll

        <R> java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(java.util.Collection<? extends ID> colIds,
                                                                          com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor,
                                                                          java.util.function.BiConsumer<? super ID,​? super R> callback)
        Stream the entities associated with the specified ids to the provided callback.
        Type Parameters:
        R - the type of the extracted values
        Parameters:
        colIds - a Collection of ids that may be present in this repository
        extractor - the ValueExtractor to extract values with
        callback - a consumer of results as they become available
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
      • getAll

        java.util.concurrent.CompletableFuture<java.util.Collection<T>> getAll​(com.tangosol.util.Filter<?> filter)
        Return all entities that satisfy the specified criteria.
        Parameters:
        filter - the criteria to evaluate
        Returns:
        a CompletableFuture that will resolve to all entities that satisfy the specified criteria
      • getAll

        java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(com.tangosol.util.Filter<?> filter,
                                                                      java.util.function.Consumer<? super T> callback)
        Stream all entities that satisfy the specified criteria.
        Parameters:
        filter - the criteria to evaluate
        callback - a consumer of results as they become available
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
        See Also:
        getAll(Filter)
      • getAll

        <R> java.util.concurrent.CompletableFuture<java.util.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 extraction
        extractor - the ValueExtractor to extract values with
        Returns:
        a CompletableFuture that will resolve to a map of extracted values, keyed by entity id
        See Also:
        get(Object, ValueExtractor)
      • getAll

        <R> java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(com.tangosol.util.Filter<?> filter,
                                                                          com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor,
                                                                          java.util.function.BiConsumer<? super ID,​? super R> callback)
        Streams the id and the associated extracted value 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 extraction
        extractor - the ValueExtractor to extract values with
        callback - a consumer of results as they become available
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
        See Also:
        getAll(Filter, ValueExtractor)
      • getAll

        <R> java.util.concurrent.CompletableFuture<java.util.Map<ID,​R>> getAll​(com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor)
        Return a map of values extracted from all entities in the repository.
        Type Parameters:
        R - the type of the extracted values
        Parameters:
        extractor - the ValueExtractor to extract values with
        Returns:
        a CompletableFuture that will resolve to a map of extracted values, keyed by entity id
        See Also:
        get(Object, ValueExtractor)
      • getAll

        <R> java.util.concurrent.CompletableFuture<java.lang.Void> getAll​(com.tangosol.util.ValueExtractor<? super T,​? extends R> extractor,
                                                                          java.util.function.BiConsumer<? super ID,​? super R> callback)
        Streams the id and the associated extracted value from all entities in the repository.
        Type Parameters:
        R - the type of the extracted values
        Parameters:
        extractor - the ValueExtractor to extract values with
        callback - a consumer of results as they become available
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
        See Also:
        getAll(ValueExtractor)
      • getAllOrderedBy

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<java.util.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 specified Comparable attribute.
        Type Parameters:
        R - the type of the extracted values
        Parameters:
        filter - the criteria to evaluate
        orderBy - the Comparable attribute to sort the results by
        Returns:
        a CompletableFuture that will resolve to all entities that satisfy specified criteria, sorted using specified Comparable attribute.
      • getAllOrderedBy

        java.util.concurrent.CompletableFuture<java.util.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 specified Remote.Comparator.
        Parameters:
        filter - the criteria to evaluate
        orderBy - the comparator to sort the results with
        Returns:
        a CompletableFuture that will resolve to all entities that satisfy specified criteria, sorted using specified Remote.Comparator.
      • getAllOrderedBy

        java.util.concurrent.CompletableFuture<java.util.Collection<T>> getAllOrderedBy​(com.tangosol.util.function.Remote.Comparator<? super T> orderBy)
        Return all entities in this repository, sorted using specified Remote.Comparator.
        Parameters:
        orderBy - the comparator to sort the results with
        Returns:
        a CompletableFuture that will resolve to all entities in this repository, sorted using specified Remote.Comparator.
      • getAllOrderedBy

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<java.util.Collection<T>> getAllOrderedBy​(com.tangosol.util.ValueExtractor<? super T,​? extends R> orderBy)
        Return all entities in this repository, sorted using specified Comparable attribute.
        Type Parameters:
        R - the type of the extracted values
        Parameters:
        orderBy - the Comparable attribute to sort the results by
        Returns:
        a CompletableFuture that will resolve to all entities in this repository, sorted using specified Comparable attribute.
      • save

        <S extends T> java.util.concurrent.CompletableFuture<S> save​(S entity)
        Description copied from interface: AsyncCrudRepository
        Saves a given entity. Use the returned instance for further operations as the save operation might have changed the entity instance completely.
        Specified by:
        save in interface AsyncCrudRepository<T,​ID>
        Type Parameters:
        S - the entity type
        Parameters:
        entity - must not be null
        Returns:
        the saved entity; will never be null
      • saveAll

        <S extends T> java.util.concurrent.CompletableFuture<java.lang.Iterable<S>> saveAll​(java.lang.Iterable<S> entities)
        Description copied from interface: AsyncCrudRepository
        Saves all given entities.
        Specified by:
        saveAll in interface AsyncCrudRepository<T,​ID>
        Type Parameters:
        S - the entity type
        Parameters:
        entities - must not be null nor must it contain null
        Returns:
        the saved entities; will never be null. The returned Iterable will have the same size as the Iterable passed as an argument
      • saveAll

        java.util.concurrent.CompletableFuture<java.lang.Void> saveAll​(java.util.stream.Stream<? extends T> strEntities)
        Store all specified entities as a batch.
        Parameters:
        strEntities - the entities to store
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
      • update

        <U> java.util.concurrent.CompletableFuture<java.lang.Void> update​(ID id,
                                                                          com.tangosol.util.ValueUpdater<? super T,​? super U> updater,
                                                                          U value)
        Update an entity using specified updater and the new value.

        For example, you could update Person's age attribute by calling a setter on a remote Person entity 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 identifier
        updater - the updater function to use
        value - the value to update entity with, which will be passed as an argument to the updater function
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
      • update

        <U> java.util.concurrent.CompletableFuture<java.lang.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 optional EntityFactory that will be used to create entity instance if it doesn't already exist in the repository.

        For example, you could update Person's age attribute by calling a setter on a remote Person entity instance:

             people.update(ssn, Person::setAge, 21, Person::new);
         
        If the person with the specified identifier does not exist, the EntityFactory will be used to create a new instance. In the example above, it will invoke a constructor on the Person class 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 identifier
        updater - the updater function to use
        value - the value to update entity with, which will be passed as an argument to the updater function
        factory - the entity factory to use to create new entity instance
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
      • update

        <R> java.util.concurrent.CompletableFuture<R> update​(ID id,
                                                             com.tangosol.util.function.Remote.Function<? super T,​? extends R> updater)
        Update an entity using specified updater function.

        For example, you could increment Person's age attribute and return the updated Person entity:

            people.update(ssn, person ->
                {
                person.setAge(person.getAge() + 1);
                return person;
                });
         
        This variant of the update method 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 identifier
        updater - the updater function to use
        Returns:
        a CompletableFuture that will resolve to the result of updater function evaluation
      • update

        <R> java.util.concurrent.CompletableFuture<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 optional EntityFactory that will be used to create entity instance if it doesn't already exist in the repository.

        For example, you could increment Person's age attribute and return the updated Person entity:

            people.update(ssn, person ->
                {
                person.setAge(person.getAge() + 1);
                return person;
                }, Person::new);
         
        If the person with the specified identifier does not exist, the EntityFactory will be used to create a new instance. In the example above, it will invoke a constructor on the Person class that takes identifier as an argument.

        This variant of the update method 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 identifier
        updater - the updater function to use
        factory - the entity factory to use to create new entity instance
        Returns:
        a CompletableFuture that will resolve to the result of updater function evaluation
      • update

        <U,​R> java.util.concurrent.CompletableFuture<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 ShoppingCart entity and return the updated ShoppingCart instance 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 update
        R - the type of return value of the updater function
        Parameters:
        id - the entity's identifier
        updater - the updater function to use
        value - the value to update entity with, which will be passed as an argument to the updater function
        Returns:
        a CompletableFuture that will resolve to the result of updater function evaluation
      • update

        <U,​R> java.util.concurrent.CompletableFuture<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 optional EntityFactory that 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 ShoppingCart entity and return the updated ShoppingCart instance 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 specified EntityFactory will be used to create a new instance. In the example above, it will invoke a constructor on the ShoppingCart class 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 update
        R - the type of return value of the updater function
        Parameters:
        id - the entity's identifier
        updater - the updater function to use
        value - the value to update entity with, which will be passed as an argument to the updater function
        factory - the entity factory to use to create new entity instance
        Returns:
        a CompletableFuture that will resolve to the result of updater function evaluation
      • updateAll

        <U> java.util.concurrent.CompletableFuture<java.lang.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 update
        updater - the updater function to use
        value - the value to update each entity with, which will be passed as an argument to the updater function
        Returns:
        a CompletableFuture that can be used to determine whether the operation completed
      • updateAll

        <R> java.util.concurrent.CompletableFuture<java.util.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 update
        updater - the updater function to use
        Returns:
        a CompletableFuture that will resolve to a map of updater function results, keyed by entity id
      • updateAll

        <U,​R> java.util.concurrent.CompletableFuture<java.util.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 update
        R - the type of return value of the updater function
        Parameters:
        filter - the criteria to use to select entities to update
        updater - the updater function to use
        value - the value to update each entity with, which will be passed as an argument to the updater function
        Returns:
        a CompletableFuture that will resolve to a map of updater function results, keyed by entity id
      • average

        java.util.concurrent.CompletableFuture<java.lang.Double> average​(com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
        Return the average of the specified function.
        Parameters:
        extractor - the function to average; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the average of the specified function
      • average

        java.util.concurrent.CompletableFuture<java.lang.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 criteria
        extractor - the function to average; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the average of the specified function
      • average

        java.util.concurrent.CompletableFuture<java.lang.Double> average​(com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
        Return the average of the specified function.
        Parameters:
        extractor - the function to average; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the average of the specified function
      • average

        java.util.concurrent.CompletableFuture<java.lang.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 criteria
        extractor - the function to average; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the average of the specified function
      • average

        java.util.concurrent.CompletableFuture<java.lang.Double> average​(com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
        Return the average of the specified function.
        Parameters:
        extractor - the function to average; typically a method reference on the entity class, such as Person::getWeight
        Returns:
        a CompletableFuture that will resolve to the average of the specified function
      • average

        java.util.concurrent.CompletableFuture<java.lang.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 criteria
        extractor - the function to average; typically a method reference on the entity class, such as Person::getWeight
        Returns:
        a CompletableFuture that will resolve to the average of the specified function
      • average

        java.util.concurrent.CompletableFuture<java.math.BigDecimal> average​(com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor)
        Return the average of the specified function.
        Parameters:
        extractor - the function to average; typically a method reference on the entity class, such as Person::getSalary
        Returns:
        a CompletableFuture that will resolve to the average of the specified function
      • average

        java.util.concurrent.CompletableFuture<java.math.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 criteria
        extractor - the function to average; typically a method reference on the entity class, such as Person::getSalary
        Returns:
        a CompletableFuture that will resolve to the average of the specified function
      • distinct

        <R> java.util.concurrent.CompletableFuture<java.util.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 as Person::getName
        Returns:
        a CompletableFuture that will resolve to a set of distinct values for the specified extractor
      • distinct

        <R> java.util.concurrent.CompletableFuture<java.util.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 criteria
        extractor - the extractor to get a value from; typically a method reference on the entity class, such as Person::getName
        Returns:
        a CompletableFuture that will resolve to a set of distinct values for the specified extractor
      • groupBy

        <K> java.util.concurrent.CompletableFuture<java.util.Map<K,​java.util.Set<T>>> groupBy​(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:
        extractor - the extractor to get a grouping value from; typically a method reference on the entity class, such as Person::getGender
        Returns:
        a CompletableFuture that will resolve to a 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> java.util.concurrent.CompletableFuture<java.util.Map<K,​java.util.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 as Person::getGender
        orderBy - the Remote.Comparator to sort the results within each group by
        Returns:
        a CompletableFuture that will resolve to a 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> java.util.concurrent.CompletableFuture<java.util.Map<K,​java.util.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 criteria
        extractor - the extractor to get a grouping value from; typically a method reference on the entity class, such as Person::getGender
        Returns:
        a CompletableFuture that will resolve to a 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> java.util.concurrent.CompletableFuture<java.util.Map<K,​java.util.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 criteria
        extractor - the extractor to get a grouping value from; typically a method reference on the entity class, such as Person::getGender
        orderBy - the Remote.Comparator to sort the results within each group by
        Returns:
        a CompletableFuture that will resolve to a 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,​A,​R> java.util.concurrent.CompletableFuture<java.util.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.
        Type Parameters:
        K - the type of extracted grouping keys
        A - the type of collector's accumulator
        R - 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 as Person::getGender
        collector - the RemoteCollector to apply to grouped entities
        Returns:
        a CompletableFuture that will resolve to a 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 specified collector for each group
        See Also:
        RemoteCollectors
      • groupBy

        <K,​A,​R> java.util.concurrent.CompletableFuture<java.util.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.
        Type Parameters:
        K - the type of extracted grouping keys
        A - the type of collector's accumulator
        R - the type of collector's result
        Parameters:
        filter - the entity selection criteria
        extractor - the extractor to get a grouping value from; typically a method reference on the entity class, such as Person::getGender
        collector - the RemoteCollector to apply to grouped entities
        Returns:
        a CompletableFuture that will resolve to a 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 specified collector for each group
        See Also:
        RemoteCollectors
      • groupBy

        <K,​A,​R,​M extends java.util.Map<K,​R>> java.util.concurrent.CompletableFuture<M> groupBy​(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 keys
        A - the type of collector's accumulator
        R - the type of collector's result
        M - the type of result Map
        Parameters:
        extractor - the extractor to get a grouping value from; typically a method reference on the entity class, such as Person::getGender
        mapFactory - the supplier to use to create result Map
        collector - the RemoteCollector to apply to grouped entities
        Returns:
        a CompletableFuture that will resolve to a 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 specified collector for each group
        See Also:
        RemoteCollectors
      • groupBy

        <K,​A,​R,​M extends java.util.Map<K,​R>> java.util.concurrent.CompletableFuture<M> groupBy​(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 keys
        A - the type of collector's accumulator
        R - the type of collector's result
        M - the type of result Map
        Parameters:
        filter - the entity selection criteria
        extractor - the extractor to get a grouping value from; typically a method reference on the entity class, such as Person::getGender
        mapFactory - the supplier to use to create result Map
        collector - the RemoteCollector to apply to grouped entities
        Returns:
        a CompletableFuture that will resolve to a 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 specified collector for each group
        See Also:
        RemoteCollectors
      • max

        java.util.concurrent.CompletableFuture<java.lang.Integer> max​(com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
        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 as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the maximum value of the specified function
      • max

        java.util.concurrent.CompletableFuture<java.lang.Integer> 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 criteria
        extractor - the function to determine the maximum value for; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the maximum value of the specified function
      • max

        java.util.concurrent.CompletableFuture<java.lang.Long> max​(com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
        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 as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the maximum value of the specified function
      • max

        java.util.concurrent.CompletableFuture<java.lang.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 criteria
        extractor - the function to determine the maximum value for; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the maximum value of the specified function
      • max

        java.util.concurrent.CompletableFuture<java.lang.Double> max​(com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
        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 as Person::getWeight
        Returns:
        a CompletableFuture that will resolve to the maximum value of the specified function
      • max

        java.util.concurrent.CompletableFuture<java.lang.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 criteria
        extractor - the function to determine the maximum value for; typically a method reference on the entity class, such as Person::getWeight
        Returns:
        a CompletableFuture that will resolve to the maximum value of the specified function
      • max

        java.util.concurrent.CompletableFuture<java.math.BigDecimal> max​(com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor)
        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 as Person::getSalary
        Returns:
        a CompletableFuture that will resolve to the maximum value of the specified function
      • max

        java.util.concurrent.CompletableFuture<java.math.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 criteria
        extractor - the function to determine the maximum value for; typically a method reference on the entity class, such as Person::getSalary
        Returns:
        a CompletableFuture that will resolve to the maximum value of the specified function
      • max

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<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 value
        Parameters:
        extractor - the function to determine the maximum value for; typically a method reference on the entity class, such as Person::getName
        Returns:
        a CompletableFuture that will resolve to the maximum value of the specified function
      • max

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<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 value
        Parameters:
        filter - the entity selection criteria
        extractor - the function to determine the maximum value for; typically a method reference on the entity class, such as Person::getName
        Returns:
        a CompletableFuture that will resolve to the maximum value of the specified function
      • maxBy

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<java.util.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 value
        Parameters:
        extractor - the function to determine the maximum value for; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the entity with the maximum value of the specified function
      • maxBy

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<java.util.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 value
        Parameters:
        filter - the entity selection criteria
        extractor - the function to determine the maximum value for; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the entity with the maximum value of the specified function
      • min

        java.util.concurrent.CompletableFuture<java.lang.Integer> min​(com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
        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 as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the minimum value of the specified function
      • min

        java.util.concurrent.CompletableFuture<java.lang.Integer> 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 criteria
        extractor - the function to determine the minimum value for; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the minimum value of the specified function
      • min

        java.util.concurrent.CompletableFuture<java.lang.Long> min​(com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
        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 as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the minimum value of the specified function
      • min

        java.util.concurrent.CompletableFuture<java.lang.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 criteria
        extractor - the function to determine the minimum value for; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the minimum value of the specified function
      • min

        java.util.concurrent.CompletableFuture<java.lang.Double> min​(com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
        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 as Person::getWeight
        Returns:
        a CompletableFuture that will resolve to the minimum value of the specified function
      • min

        java.util.concurrent.CompletableFuture<java.lang.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 criteria
        extractor - the function to determine the minimum value for; typically a method reference on the entity class, such as Person::getWeight
        Returns:
        a CompletableFuture that will resolve to the minimum value of the specified function
      • min

        java.util.concurrent.CompletableFuture<java.math.BigDecimal> min​(com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor)
        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 as Person::getSalary
        Returns:
        a CompletableFuture that will resolve to the minimum value of the specified function
      • min

        java.util.concurrent.CompletableFuture<java.math.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 criteria
        extractor - the function to determine the minimum value for; typically a method reference on the entity class, such as Person::getSalary
        Returns:
        a CompletableFuture that will resolve to the minimum value of the specified function
      • min

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<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 value
        Parameters:
        extractor - the function to determine the minimum value for; typically a method reference on the entity class, such as Person::getName
        Returns:
        a CompletableFuture that will resolve to the minimum value of the specified function
      • min

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<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 value
        Parameters:
        filter - the entity selection criteria
        extractor - the function to determine the minimum value for; typically a method reference on the entity class, such as Person::getName
        Returns:
        a CompletableFuture that will resolve to the minimum value of the specified function
      • minBy

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<java.util.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 value
        Parameters:
        extractor - the function to determine the minimum value for; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the entity with the minimum value of the specified function
      • minBy

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<java.util.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 value
        Parameters:
        filter - the entity selection criteria
        extractor - the function to determine the minimum value for; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the entity with the minimum value of the specified function
      • sum

        java.util.concurrent.CompletableFuture<java.lang.Long> sum​(com.tangosol.util.function.Remote.ToIntFunction<? super T> extractor)
        Return the sum of the specified function.
        Parameters:
        extractor - the function to sum; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the sum of the specified function
      • sum

        java.util.concurrent.CompletableFuture<java.lang.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 criteria
        extractor - the function to sum; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the sum of the specified function
      • sum

        java.util.concurrent.CompletableFuture<java.lang.Long> sum​(com.tangosol.util.function.Remote.ToLongFunction<? super T> extractor)
        Return the sum of the specified function.
        Parameters:
        extractor - the function to sum; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the sum of the specified function
      • sum

        java.util.concurrent.CompletableFuture<java.lang.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 criteria
        extractor - the function to sum; typically a method reference on the entity class, such as Person::getAge
        Returns:
        a CompletableFuture that will resolve to the sum of the specified function
      • sum

        java.util.concurrent.CompletableFuture<java.lang.Double> sum​(com.tangosol.util.function.Remote.ToDoubleFunction<? super T> extractor)
        Return the sum of the specified function.
        Parameters:
        extractor - the function to sum; typically a method reference on the entity class, such as Person::getWeight
        Returns:
        a CompletableFuture that will resolve to the sum of the specified function
      • sum

        java.util.concurrent.CompletableFuture<java.lang.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 criteria
        extractor - the function to sum; typically a method reference on the entity class, such as Person::getWeight
        Returns:
        a CompletableFuture that will resolve to the sum of the specified function
      • sum

        java.util.concurrent.CompletableFuture<java.math.BigDecimal> sum​(com.tangosol.util.function.Remote.ToBigDecimalFunction<? super T> extractor)
        Return the sum of the specified function.
        Parameters:
        extractor - the function to sum; typically a method reference on the entity class, such as Person::getSalary
        Returns:
        a CompletableFuture that will resolve to the sum of the specified function
      • sum

        java.util.concurrent.CompletableFuture<java.math.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 criteria
        extractor - the function to sum; typically a method reference on the entity class, such as Person::getSalary
        Returns:
        a CompletableFuture that will resolve to the sum of the specified function
      • top

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<java.util.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 returned values
        Parameters:
        extractor - the extractor to get the values to compare with
        cResults - the number of highest values to return
        Returns:
        a CompletableFuture that will resolve to the top N highest values for the specified extractor
      • top

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<java.util.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 returned values
        Parameters:
        filter - the entity selection criteria
        extractor - the extractor to get the values to compare with
        cResults - the number of highest values to return
        Returns:
        a CompletableFuture that will resolve to the top N highest values for the specified extractor
      • top

        <R> java.util.concurrent.CompletableFuture<java.util.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 returned values
        Parameters:
        extractor - the extractor to get the values to compare with
        comparator - the comparator to use when comparing extracted values
        cResults - the number of highest values to return
        Returns:
        a CompletableFuture that will resolve to the top N highest values for the specified extractor
      • top

        <R> java.util.concurrent.CompletableFuture<java.util.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 returned values
        Parameters:
        filter - the entity selection criteria
        extractor - the extractor to get the values to compare with
        comparator - the comparator to use when comparing extracted values
        cResults - the number of highest values to return
        Returns:
        a CompletableFuture that will resolve to the top N highest values for the specified extractor
      • topBy

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<java.util.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 values used for comparison
        Parameters:
        extractor - the extractor to get the values to compare with
        cResults - the number of highest values to return
        Returns:
        a CompletableFuture that will resolve to the top N entities with the highest values for the specified extractor
      • topBy

        <R extends java.lang.Comparable<? super R>> java.util.concurrent.CompletableFuture<java.util.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 criteria
        extractor - the extractor to get the values to compare with
        cResults - the number of highest values to return
        Returns:
        a CompletableFuture that will resolve to the top N entities with the highest values for the specified extractor
      • topBy

        java.util.concurrent.CompletableFuture<java.util.List<T>> topBy​(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:
        comparator - the comparator to use when comparing extracted values
        cResults - the number of highest values to return
        Returns:
        a CompletableFuture that will resolve to the top N entities with the highest value for the specified extractor
      • topBy

        java.util.concurrent.CompletableFuture<java.util.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 criteria
        comparator - the comparator to use when comparing extracted values
        cResults - the number of highest values to return
        Returns:
        a CompletableFuture that will resolve to 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: ListenerSupport
        Register a listener that will observe all repository events.
        Specified by:
        addListener in interface ListenerSupport<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: ListenerSupport
        Unregister a listener that observes all repository events.
        Specified by:
        removeListener in interface ListenerSupport<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: ListenerSupport
        Register a listener that will observe all events for a specific entity.
        Specified by:
        addListener in interface ListenerSupport<T,​ID>
        Parameters:
        id - the identifier of the entity to observe
        listener - the event listener to register
      • removeListener

        void removeListener​(ID id,
                            com.oracle.coherence.repository.AbstractRepositoryBase.Listener<? super T> listener)
        Description copied from interface: ListenerSupport
        Unregister a listener that observes all events for a specific entity.
        Specified by:
        removeListener in interface ListenerSupport<T,​ID>
        Parameters:
        id - the identifier of the entity to observe
        listener - 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: ListenerSupport
        Register a listener that will observe all events for entities that satisfy the specified criteria.
        Specified by:
        addListener in interface ListenerSupport<T,​ID>
        Parameters:
        filter - the criteria to use to select entities to observe
        listener - 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: ListenerSupport
        Unregister a listener that observes all events for entities that satisfy the specified criteria.
        Specified by:
        removeListener in interface ListenerSupport<T,​ID>
        Parameters:
        filter - the criteria to use to select entities to observe
        listener - the event listener to unregister
      • listener

        com.oracle.coherence.repository.AbstractRepositoryBase.Listener.Builder<T> listener()
        Description copied from interface: ListenerSupport
        Create new AbstractRepositoryBase.Listener.Builder instance.
        Specified by:
        listener in interface ListenerSupport<T,​ID>
        Returns:
        a new AbstractRepositoryBase.Listener.Builder instance