Class HelidonNamedCacheService

All Implemented Interfaces:
GrpcService, GrpcProxyService, NamedCacheService

public class HelidonNamedCacheService extends BaseNamedCacheServiceImpl implements NamedCacheService
Author:
Jonathan Knight 2024.02.08
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.oracle.coherence.grpc.proxy.common.BaseGrpcServiceImpl

    BaseGrpcServiceImpl.DefaultDependencies, BaseGrpcServiceImpl.Dependencies

    Nested classes/interfaces inherited from interface com.oracle.coherence.grpc.proxy.common.v0.NamedCacheService

    NamedCacheService.DefaultDependencies, NamedCacheService.Dependencies
  • Field Summary

  • Constructor Summary

    Constructors
    Constructor
    Description
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addIndex(com.oracle.coherence.grpc.messages.cache.v0.AddIndexRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
    Add an index to a cache.
    void
    aggregate(com.oracle.coherence.grpc.messages.cache.v0.AggregateRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
    Execute an AggregateRequest against a cache and return the result serialized in a BytesValue.
    void
    containsEntry(com.oracle.coherence.grpc.messages.cache.v0.ContainsEntryRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
    Returns true if this map contains a mapping for the specified key to the specified value.
    void
    containsKey(com.oracle.coherence.grpc.messages.cache.v0.ContainsKeyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
    Returns true if this map contains a mapping for the specified key.
    void
    containsValue(com.oracle.coherence.grpc.messages.cache.v0.ContainsValueRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
    Returns true if this map contains a mapping for the specified value.
    void
    entrySet(com.oracle.coherence.grpc.messages.cache.v0.EntrySetRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
    Stream a set of cache entries to a StreamObserver.
    void
    get(com.oracle.coherence.grpc.messages.cache.v0.GetRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.OptionalValue> observer)
    Get a value for a given key from a cache.
    void
    getAll(com.oracle.coherence.grpc.messages.cache.v0.GetAllRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
    Obtain a stream of mappings of keys to values for all the specified keys.
    void
    invoke(com.oracle.coherence.grpc.messages.cache.v0.InvokeRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
    Invoke an InvocableMap.EntryProcessor against an entry in a cache.
    void
    invokeAll(com.oracle.coherence.grpc.messages.cache.v0.InvokeAllRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
    Invoke an InvocableMap.EntryProcessor against multiple entries in a cache.
    protected void
    invokeAllWithFilter(CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.InvokeAllRequest,Void> holder, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
    Execute the filtered InvokeAllRequest request passing the results to the provided StreamObserver.
    protected void
    invokeAllWithKeys(CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.InvokeAllRequest,Void> holder, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
    Execute the key-based InvokeAllRequest request passing the results to the provided StreamObserver.
    void
    isEmpty(com.oracle.coherence.grpc.messages.cache.v0.IsEmptyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
    Determine whether a cache is empty.
    void
    isReady(com.oracle.coherence.grpc.messages.cache.v0.IsReadyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
    Determine whether a cache is Ready.
    void
    keySet(com.oracle.coherence.grpc.messages.cache.v0.KeySetRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
    Stream a set of cache keys to a StreamObserver.
    Create an instance of HelidonNamedCacheService using the default dependencies configuration.
    void
    nextEntrySetPage(com.oracle.coherence.grpc.messages.cache.v0.PageRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.EntryResult> observer)
    Obtain the next page of a paged entry set request.
    void
    nextKeySetPage(com.oracle.coherence.grpc.messages.cache.v0.PageRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
    Obtain the next page of a paged key set request.
    void
    put(com.oracle.coherence.grpc.messages.cache.v0.PutRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
    Associate the specified value with the specified key in this cache.
    void
    putAll(com.oracle.coherence.grpc.messages.cache.v0.PutAllRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
    Add the specified key value pair mappings to this cache.
    void
    putIfAbsent(com.oracle.coherence.grpc.messages.cache.v0.PutIfAbsentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
    If the specified key is not already associated with a value (or is mapped to null) associate it with the given value and returns null, else return the current value.
    void
    remove(com.oracle.coherence.grpc.messages.cache.v0.RemoveRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
    Remove the mapping that is associated with the specified key.
    void
    removeIndex(com.oracle.coherence.grpc.messages.cache.v0.RemoveIndexRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
    Remove an index from a cache.
    void
    removeMapping(com.oracle.coherence.grpc.messages.cache.v0.RemoveMappingRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
    Remove the mapping that is associated with the specified key only if the mapping exists in the cache.
    void
    replace(com.oracle.coherence.grpc.messages.cache.v0.ReplaceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
    Replace the entry for the specified key only if it is currently mapped to some value.
    void
    replaceMapping(com.oracle.coherence.grpc.messages.cache.v0.ReplaceMappingRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
    Replace the mapping for the specified key only if currently mapped to the specified value.
    void
    size(com.oracle.coherence.grpc.messages.cache.v0.SizeRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Int32Value> observer)
    Determine the number of entries in a cache.
    void
    truncate(com.oracle.coherence.grpc.messages.cache.v0.TruncateRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
    Removes all mappings from this map.
    void
    values(com.oracle.coherence.grpc.messages.cache.v0.ValuesRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
    Execute the ValuesRequest request passing the results to the provided StreamObserver.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.oracle.coherence.grpc.proxy.common.GrpcProxyService

    getMetrics

    Methods inherited from interface com.oracle.coherence.grpc.proxy.common.v0.NamedCacheService

    clear, createRequestHolder, destroy, ensureFilter, events, getFilter
  • Constructor Details

  • Method Details

    • newInstance

      public static HelidonNamedCacheService newInstance(NamedCacheService.Dependencies deps)
      Create an instance of HelidonNamedCacheService using the default dependencies configuration.
      Parameters:
      deps - the NamedCacheService.Dependencies to use to create the service
      Returns:
      an instance of HelidonNamedCacheService
    • addIndex

      public void addIndex(com.oracle.coherence.grpc.messages.cache.v0.AddIndexRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
      Description copied from interface: NamedCacheService
      Add an index to a cache.
      Specified by:
      addIndex in interface NamedCacheService
      Parameters:
      request - the AddIndexRequest containing the name of the cache to add the index to, the serialized ValueExtractor to use to create the index and the optional serialized Comparator to sort the index
      observer - the StreamObserver to receive the response
    • aggregate

      public void aggregate(com.oracle.coherence.grpc.messages.cache.v0.AggregateRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Description copied from interface: NamedCacheService
      Execute an AggregateRequest against a cache and return the result serialized in a BytesValue.
      Specified by:
      aggregate in interface NamedCacheService
      Parameters:
      request - the AggregateRequest to execute
      observer - the StreamObserver to receive the response
    • containsEntry

      public void containsEntry(com.oracle.coherence.grpc.messages.cache.v0.ContainsEntryRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Description copied from interface: NamedCacheService
      Returns true if this map contains a mapping for the specified key to the specified value.
      Specified by:
      containsEntry in interface NamedCacheService
      Parameters:
      request - the request which contains the key and value whose presence in this map is to be tested
      observer - the StreamObserver to receive the response
      See Also:
    • containsKey

      public void containsKey(com.oracle.coherence.grpc.messages.cache.v0.ContainsKeyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Description copied from interface: NamedCacheService
      Returns true if this map contains a mapping for the specified key.
      Specified by:
      containsKey in interface NamedCacheService
      Parameters:
      request - the request which contains the key whose presence in this map is to be tested
      observer - the StreamObserver to receive the response
      See Also:
    • containsValue

      public void containsValue(com.oracle.coherence.grpc.messages.cache.v0.ContainsValueRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Description copied from interface: NamedCacheService
      Returns true if this map contains a mapping for the specified value.
      Specified by:
      containsValue in interface NamedCacheService
      Parameters:
      request - the request which contains the value whose presence in this map is to be tested
      observer - the StreamObserver to receive the response
      See Also:
    • entrySet

      public void entrySet(com.oracle.coherence.grpc.messages.cache.v0.EntrySetRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
      Description copied from interface: NamedCacheService
      Stream a set of cache entries to a StreamObserver.
      Specified by:
      entrySet in interface NamedCacheService
      Parameters:
      request - the EntrySetRequest to execute
      observer - the StreamObserver to stream the entries to
      See Also:
    • get

      public void get(com.oracle.coherence.grpc.messages.cache.v0.GetRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.OptionalValue> observer)
      Description copied from interface: NamedCacheService
      Get a value for a given key from a cache.
      Specified by:
      get in interface NamedCacheService
      Parameters:
      request - the GetRequest to execute
      observer - the StreamObserver to receive events
      See Also:
    • getAll

      public void getAll(com.oracle.coherence.grpc.messages.cache.v0.GetAllRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
      Description copied from interface: NamedCacheService
      Obtain a stream of mappings of keys to values for all the specified keys.
      Specified by:
      getAll in interface NamedCacheService
      Parameters:
      request - the GetAllRequest request containing the cache name and collection of keys to obtain the mappings for
      observer - the StreamObserver to stream the results back to
    • invoke

      public void invoke(com.oracle.coherence.grpc.messages.cache.v0.InvokeRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Description copied from interface: NamedCacheService
      Invoke an InvocableMap.EntryProcessor against an entry in a cache.
      Specified by:
      invoke in interface NamedCacheService
      Parameters:
      request - the InvokeRequest containing the serialized key of the entry and the serialized InvocableMap.EntryProcessor
      observer - the StreamObserver to stream the results back to
    • invokeAll

      public void invokeAll(com.oracle.coherence.grpc.messages.cache.v0.InvokeAllRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
      Description copied from interface: NamedCacheService
      Invoke an InvocableMap.EntryProcessor against multiple entries in a cache.
      Specified by:
      invokeAll in interface NamedCacheService
      Parameters:
      request - the InvokeRequest containing the serialized keys or serialized Filter to use to identify the entries and the serialized InvocableMap.EntryProcessor
      observer - the StreamObserver to observer the invocation results
    • invokeAllWithKeys

      protected void invokeAllWithKeys(CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.InvokeAllRequest,Void> holder, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
      Execute the key-based InvokeAllRequest request passing the results to the provided StreamObserver.
      Parameters:
      holder - the CacheRequestHolder containing the InvokeAllRequest
      observer - the StreamObserver which will receive the results
    • invokeAllWithFilter

      protected void invokeAllWithFilter(CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.InvokeAllRequest,Void> holder, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
      Execute the filtered InvokeAllRequest request passing the results to the provided StreamObserver.
      Parameters:
      holder - the CacheRequestHolder containing the InvokeAllRequest
      observer - the StreamObserver which will receive the results
    • isEmpty

      public void isEmpty(com.oracle.coherence.grpc.messages.cache.v0.IsEmptyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Description copied from interface: NamedCacheService
      Determine whether a cache is empty.
      Specified by:
      isEmpty in interface NamedCacheService
      Parameters:
      request - the IsEmptyRequest to execute
      observer - the StreamObserver to observer the invocation results
      See Also:
    • isReady

      public void isReady(com.oracle.coherence.grpc.messages.cache.v0.IsReadyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Description copied from interface: NamedCacheService
      Determine whether a cache is Ready.
      Specified by:
      isReady in interface NamedCacheService
      Parameters:
      request - the IsReadyRequest to execute
      observer - the StreamObserver to observer the invocation results
      See Also:
    • keySet

      public void keySet(com.oracle.coherence.grpc.messages.cache.v0.KeySetRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Description copied from interface: NamedCacheService
      Stream a set of cache keys to a StreamObserver.
      Specified by:
      keySet in interface NamedCacheService
      Parameters:
      request - the KeySetRequest to execute
      observer - the StreamObserver to stream the keys to
      See Also:
    • nextKeySetPage

      public void nextKeySetPage(com.oracle.coherence.grpc.messages.cache.v0.PageRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Description copied from interface: NamedCacheService
      Obtain the next page of a paged key set request.
      Specified by:
      nextKeySetPage in interface NamedCacheService
      Parameters:
      request - the PageRequest to execute
      observer - the StreamObserver that will receive the responses
    • nextEntrySetPage

      public void nextEntrySetPage(com.oracle.coherence.grpc.messages.cache.v0.PageRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.EntryResult> observer)
      Description copied from interface: NamedCacheService
      Obtain the next page of a paged entry set request.
      Specified by:
      nextEntrySetPage in interface NamedCacheService
      Parameters:
      request - the PageRequest to execute
      observer - the StreamObserver that will receive the responses
    • put

      public void put(com.oracle.coherence.grpc.messages.cache.v0.PutRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Description copied from interface: NamedCacheService
      Associate the specified value with the specified key in this cache. If the cache previously contained a mapping for the key, the old value is replaced by the specified value.
      Specified by:
      put in interface NamedCacheService
      Parameters:
      request - the PutRequest to execute
      observer - the StreamObserver that will receive the responses
      See Also:
    • putAll

      public void putAll(com.oracle.coherence.grpc.messages.cache.v0.PutAllRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
      Description copied from interface: NamedCacheService
      Add the specified key value pair mappings to this cache. If the cache previously contained a mappings for the keys, the old value is replaced by the specified value.
      Specified by:
      putAll in interface NamedCacheService
      Parameters:
      request - the PutAllRequest to execute
      observer - the StreamObserver that will receive the responses
      See Also:
    • putIfAbsent

      public void putIfAbsent(com.oracle.coherence.grpc.messages.cache.v0.PutIfAbsentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Description copied from interface: NamedCacheService
      If the specified key is not already associated with a value (or is mapped to null) associate it with the given value and returns null, else return the current value.
      Specified by:
      putIfAbsent in interface NamedCacheService
      Parameters:
      request - the PutIfAbsentRequest to execute
      observer - the StreamObserver that will receive the responses
      See Also:
    • remove

      public void remove(com.oracle.coherence.grpc.messages.cache.v0.RemoveRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Description copied from interface: NamedCacheService
      Remove the mapping that is associated with the specified key.
      Specified by:
      remove in interface NamedCacheService
      Parameters:
      request - the RemoveRequest to execute
      observer - the StreamObserver that will receive the responses
      See Also:
    • removeIndex

      public void removeIndex(com.oracle.coherence.grpc.messages.cache.v0.RemoveIndexRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
      Description copied from interface: NamedCacheService
      Remove an index from a cache.
      Specified by:
      removeIndex in interface NamedCacheService
      Parameters:
      request - the RemoveIndexRequest containing the name of the cache to remove the index from, the serialized ValueExtractor that was used to create the index
      observer - the StreamObserver that will receive the responses
    • removeMapping

      public void removeMapping(com.oracle.coherence.grpc.messages.cache.v0.RemoveMappingRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Description copied from interface: NamedCacheService
      Remove the mapping that is associated with the specified key only if the mapping exists in the cache.
      Specified by:
      removeMapping in interface NamedCacheService
      Parameters:
      request - the RemoveMappingRequest to execute
      observer - the StreamObserver that will receive the responses
      See Also:
    • replace

      public void replace(com.oracle.coherence.grpc.messages.cache.v0.ReplaceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Description copied from interface: NamedCacheService
      Replace the entry for the specified key only if it is currently mapped to some value.
      Specified by:
      replace in interface NamedCacheService
      Parameters:
      request - the ReplaceRequest to execute
      observer - the StreamObserver that will receive the responses
      See Also:
    • replaceMapping

      public void replaceMapping(com.oracle.coherence.grpc.messages.cache.v0.ReplaceMappingRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Description copied from interface: NamedCacheService
      Replace the mapping for the specified key only if currently mapped to the specified value.
      Specified by:
      replaceMapping in interface NamedCacheService
      Parameters:
      request - the ReplaceMappingRequest to execute
      observer - the StreamObserver that will receive the responses
      See Also:
    • size

      public void size(com.oracle.coherence.grpc.messages.cache.v0.SizeRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Int32Value> observer)
      Description copied from interface: NamedCacheService
      Determine the number of entries in a cache.
      Specified by:
      size in interface NamedCacheService
      Parameters:
      request - the SizeRequest to execute
      observer - the StreamObserver that will receive the responses
      See Also:
    • truncate

      public void truncate(com.oracle.coherence.grpc.messages.cache.v0.TruncateRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
      Description copied from interface: NamedCacheService
      Removes all mappings from this map.

      Note: the removal of entries caused by this truncate operation will not be observable. This includes any registered listeners, triggers, or interceptors. However, a CacheLifecycleEvent is raised to notify subscribers of the execution of this operation.

      Specified by:
      truncate in interface NamedCacheService
      Parameters:
      request - the TruncateRequest containing the name of the cache to truncate
      observer - the StreamObserver that will receive the responses
    • values

      public void values(com.oracle.coherence.grpc.messages.cache.v0.ValuesRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Execute the ValuesRequest request passing the results to the provided StreamObserver.
      Specified by:
      values in interface NamedCacheService
      Parameters:
      request - the ValuesRequest
      observer - the StreamObserver which will receive the results
      See Also: