Class NettyNamedCacheService

All Implemented Interfaces:
com.oracle.coherence.grpc.GrpcService, GrpcProxyService, NamedCacheService

public class NettyNamedCacheService extends BaseNamedCacheServiceImpl implements NamedCacheService
An async gRPC NamedCacheService.

This class uses AsyncNamedCache and asynchronous CompletionStage wherever possible. This makes the code more complex but the advantages of not blocking the gRPC request thread or the Coherence service thread will outweigh the downside of complexity.

The asynchronous processing of CompletionStages is done using an DaemonPoolExecutor so as not to consume or block threads in the Fork Join Pool. The DaemonPoolExecutor is configurable so that its thread counts can be controlled.

Since:
20.06
Author:
Jonathan Knight 2020.09.22
  • 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)
     
    void
    aggregate(com.oracle.coherence.grpc.messages.cache.v0.AggregateRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
     
    void
    containsEntry(com.oracle.coherence.grpc.messages.cache.v0.ContainsEntryRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
     
    protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsEntryRequest,com.tangosol.util.Binary>>
    containsEntry(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsEntryRequest,Void> holder)
    Execute the ContainsEntryRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the contains entry request as a serialized Boolean.
    void
    containsKey(com.oracle.coherence.grpc.messages.cache.v0.ContainsKeyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
     
    protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsKeyRequest,Boolean>>
    containsKey(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsKeyRequest,Void> holder)
    Execute the ContainsKeyRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the contains key request.
    void
    containsValue(com.oracle.coherence.grpc.messages.cache.v0.ContainsValueRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
     
    protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsValueRequest,Integer>>
    containsValue(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsValueRequest,Void> holder)
    Execute the ContainsValueRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the contains value request as a serialized Boolean.
    protected CompletionStage<List<com.tangosol.util.Binary>>
    convertKeys(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.GetAllRequest,Void> holder)
    Convert the keys for a GetAllRequest from the request's serialization format to the cache's serialization format.
    void
    entrySet(com.oracle.coherence.grpc.messages.cache.v0.EntrySetRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
     
    protected Void
    entrySet(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.EntrySetRequest,Void> holder, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
    Execute the EntrySetRequest request and send the results to the 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)
     
    protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.GetRequest,com.tangosol.util.Binary>>
    get(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.GetRequest,Void> holder)
    Execute the GetRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the GetRequest request as a serialized Boolean.
    void
    getAll(com.oracle.coherence.grpc.messages.cache.v0.GetAllRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
     
    protected Void
    getAll(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.GetAllRequest,Void> holder, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
    Execute the GetAllRequest request and send the results to the StreamObserver.
    void
    invoke(com.oracle.coherence.grpc.messages.cache.v0.InvokeRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
     
    protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.InvokeRequest,com.tangosol.util.Binary>>
    invoke(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.InvokeRequest,Void> holder)
    Execute the InvokeRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the InvokeRequest request as a serialized Boolean.
    void
    invokeAll(com.oracle.coherence.grpc.messages.cache.v0.InvokeAllRequest request, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
     
    invokeAllWithFilter(com.oracle.coherence.grpc.messages.cache.v0.InvokeAllRequest request, 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.
    invokeAllWithFilter(com.oracle.coherence.grpc.v0.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.
    invokeAllWithKeys(com.oracle.coherence.grpc.messages.cache.v0.InvokeAllRequest request, 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.
    invokeAllWithKeys(com.oracle.coherence.grpc.v0.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)
     
    void
    isReady(com.oracle.coherence.grpc.messages.cache.v0.IsReadyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
     
    void
    keySet(com.oracle.coherence.grpc.messages.cache.v0.KeySetRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
     
    protected Void
    keySet(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.KeySetRequest,Void> holder, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
    Execute the key-based KeySetRequest request passing the results to the provided StreamObserver.
    Create an instance of NettyNamedCacheService using the default dependencies configuration.
    Create an instance of NettyNamedCacheService 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)
     
    void
    nextKeySetPage(com.oracle.coherence.grpc.messages.cache.v0.PageRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
     
    void
    put(com.oracle.coherence.grpc.messages.cache.v0.PutRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
     
    protected CompletionStage<com.google.protobuf.BytesValue>
    put(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.PutRequest,Void> holder)
    Execute a put request.
    void
    putAll(com.oracle.coherence.grpc.messages.cache.v0.PutAllRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
     
    protected CompletionStage<com.google.protobuf.Empty>
    putAll(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.PutAllRequest,Void> holder)
    Execute a putAll request.
    void
    putIfAbsent(com.oracle.coherence.grpc.messages.cache.v0.PutIfAbsentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
     
    protected CompletableFuture<com.google.protobuf.BytesValue>
    putIfAbsent(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.PutIfAbsentRequest,Void> holder)
    Execute a PutIfAbsentRequest request.
    void
    remove(com.oracle.coherence.grpc.messages.cache.v0.RemoveRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
     
    protected CompletableFuture<com.tangosol.util.Binary>
    remove(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.RemoveRequest,Void> holder)
    Execute a RemoveRequest request.
    void
    removeIndex(com.oracle.coherence.grpc.messages.cache.v0.RemoveIndexRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
     
    void
    removeMapping(com.oracle.coherence.grpc.messages.cache.v0.RemoveMappingRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
     
    protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.RemoveMappingRequest,Boolean>>
    removeMapping(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.RemoveMappingRequest,Void> holder)
    Execute the RemoveMappingRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the RemoveMappingRequest request as a serialized Boolean.
    void
    replace(com.oracle.coherence.grpc.messages.cache.v0.ReplaceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
     
    protected CompletableFuture<com.tangosol.util.Binary>
    replace(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ReplaceRequest,Void> holder)
    Execute a ReplaceRequest request.
    void
    replaceMapping(com.oracle.coherence.grpc.messages.cache.v0.ReplaceMappingRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
     
    protected CompletableFuture<com.tangosol.util.Binary>
    replaceMapping(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ReplaceMappingRequest,Void> holder)
    Execute a ReplaceMappingRequest request.
    void
    size(com.oracle.coherence.grpc.messages.cache.v0.SizeRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Int32Value> observer)
     
    void
    truncate(com.oracle.coherence.grpc.messages.cache.v0.TruncateRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
     
    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.
    protected Void
    values(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ValuesRequest,Void> holder, 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 NettyNamedCacheService newInstance(NamedCacheService.Dependencies deps)
      Create an instance of NettyNamedCacheService using the default dependencies configuration.
      Parameters:
      deps - the NamedCacheService.Dependencies to use to create the service
      Returns:
      an instance of NettyNamedCacheService
    • newInstance

      public static NettyNamedCacheService newInstance()
      Create an instance of NettyNamedCacheService using the default dependencies configuration.
      Returns:
      an instance of NettyNamedCacheService
    • addIndex

      public void addIndex(com.oracle.coherence.grpc.messages.cache.v0.AddIndexRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
      Specified by:
      addIndex in interface NamedCacheService
    • aggregate

      public void aggregate(com.oracle.coherence.grpc.messages.cache.v0.AggregateRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Specified by:
      aggregate in interface NamedCacheService
    • containsEntry

      public void containsEntry(com.oracle.coherence.grpc.messages.cache.v0.ContainsEntryRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Specified by:
      containsEntry in interface NamedCacheService
    • containsEntry

      protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsEntryRequest,com.tangosol.util.Binary>> containsEntry(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsEntryRequest,Void> holder)
      Execute the ContainsEntryRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the contains entry request as a serialized Boolean.
      Parameters:
      holder - the CacheRequestHolder containing the ContainsEntryRequest request
      Returns:
      a CompletionStage that completes with a CacheRequestHolder containing the serialized Boolean result of executing the ContainsEntryRequest request
    • containsKey

      public void containsKey(com.oracle.coherence.grpc.messages.cache.v0.ContainsKeyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Specified by:
      containsKey in interface NamedCacheService
    • containsKey

      protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsKeyRequest,Boolean>> containsKey(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsKeyRequest,Void> holder)
      Execute the ContainsKeyRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the contains key request.
      Parameters:
      holder - the CacheRequestHolder containing the ContainsKeyRequest request
      Returns:
      a CompletionStage that completes with a CacheRequestHolder containing the Boolean result of executing the ContainsKeyRequest request
    • containsValue

      public void containsValue(com.oracle.coherence.grpc.messages.cache.v0.ContainsValueRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Specified by:
      containsValue in interface NamedCacheService
    • containsValue

      protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsValueRequest,Integer>> containsValue(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ContainsValueRequest,Void> holder)
      Execute the ContainsValueRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the contains value request as a serialized Boolean.
      Parameters:
      holder - the CacheRequestHolder containing the ContainsValueRequest request
      Returns:
      a CompletionStage that completes with a CacheRequestHolder containing the serialized Boolean result of executing the ContainsValueRequest request
    • 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)
      Specified by:
      entrySet in interface NamedCacheService
    • entrySet

      protected Void entrySet(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.EntrySetRequest,Void> holder, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
      Execute the EntrySetRequest request and send the results to the StreamObserver.
      Parameters:
      holder - the CacheRequestHolder containing the EntrySetRequest request
      observer - the StreamObserver which will receive results
      Returns:
      always return Void
    • 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)
      Specified by:
      get in interface NamedCacheService
    • get

      protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.GetRequest,com.tangosol.util.Binary>> get(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.GetRequest,Void> holder)
      Execute the GetRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the GetRequest request as a serialized Boolean.
      Parameters:
      holder - the CacheRequestHolder containing the GetRequest request
      Returns:
      a CompletionStage that completes with a CacheRequestHolder containing the serialized Binary result of executing the GetRequest request
    • 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)
      Specified by:
      getAll in interface NamedCacheService
    • getAll

      protected Void getAll(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.GetAllRequest,Void> holder, io.grpc.stub.StreamObserver<com.oracle.coherence.grpc.messages.cache.v0.Entry> observer)
      Execute the GetAllRequest request and send the results to the StreamObserver.
      Parameters:
      holder - the CacheRequestHolder containing the GetAllRequest request
      observer - the StreamObserver which will receive results
      Returns:
      always return Void
    • invoke

      public void invoke(com.oracle.coherence.grpc.messages.cache.v0.InvokeRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Specified by:
      invoke in interface NamedCacheService
    • invoke

      protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.InvokeRequest,com.tangosol.util.Binary>> invoke(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.InvokeRequest,Void> holder)
      Execute the InvokeRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the InvokeRequest request as a serialized Boolean.
      Parameters:
      holder - the CacheRequestHolder containing the InvokeRequest request
      Returns:
      a CompletionStage that completes with a CacheRequestHolder containing the serialized Binary result of executing the InvokeRequest request
    • 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)
      Specified by:
      invokeAll in interface NamedCacheService
    • invokeAllWithFilter

      protected CompletionStage<Void> invokeAllWithFilter(com.oracle.coherence.grpc.messages.cache.v0.InvokeAllRequest request, 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:
      request - the InvokeAllRequest
      observer - the StreamObserver which will receive the results
      Returns:
      always returns a CompletionStage returning Void
    • invokeAllWithFilter

      protected CompletionStage<Void> invokeAllWithFilter(com.oracle.coherence.grpc.v0.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
      Returns:
      always returns a CompletionStage returning Void
    • invokeAllWithKeys

      protected CompletionStage<Void> invokeAllWithKeys(com.oracle.coherence.grpc.messages.cache.v0.InvokeAllRequest request, 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:
      request - the InvokeAllRequest
      observer - the StreamObserver which will receive the results
      Returns:
      always returns a CompletionStage returning Void
    • invokeAllWithKeys

      protected CompletionStage<Void> invokeAllWithKeys(com.oracle.coherence.grpc.v0.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
      Returns:
      always returns a CompletionStage returning Void
    • isEmpty

      public void isEmpty(com.oracle.coherence.grpc.messages.cache.v0.IsEmptyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Specified by:
      isEmpty in interface NamedCacheService
    • isReady

      public void isReady(com.oracle.coherence.grpc.messages.cache.v0.IsReadyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Specified by:
      isReady in interface NamedCacheService
    • keySet

      public void keySet(com.oracle.coherence.grpc.messages.cache.v0.KeySetRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Specified by:
      keySet in interface NamedCacheService
    • keySet

      protected Void keySet(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.KeySetRequest,Void> holder, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Execute the key-based KeySetRequest request passing the results to the provided StreamObserver.
      Parameters:
      holder - the CacheRequestHolder containing the KeySetRequest
      observer - the StreamObserver which will receive the results
      Returns:
      always returns Void
    • nextKeySetPage

      public void nextKeySetPage(com.oracle.coherence.grpc.messages.cache.v0.PageRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Specified by:
      nextKeySetPage in interface NamedCacheService
    • 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)
      Specified by:
      nextEntrySetPage in interface NamedCacheService
    • put

      public void put(com.oracle.coherence.grpc.messages.cache.v0.PutRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Specified by:
      put in interface NamedCacheService
    • put

      protected CompletionStage<com.google.protobuf.BytesValue> put(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.PutRequest,Void> holder)
      Execute a put request.
      Parameters:
      holder - the CacheRequestHolder containing the PutRequest request
      Returns:
      a CompletionStage that completes with a BytesValue containing the serialized result of executing the PutRequest request
    • putAll

      public void putAll(com.oracle.coherence.grpc.messages.cache.v0.PutAllRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
      Specified by:
      putAll in interface NamedCacheService
    • putAll

      protected CompletionStage<com.google.protobuf.Empty> putAll(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.PutAllRequest,Void> holder)
      Execute a putAll request.
      Parameters:
      holder - the CacheRequestHolder containing the PutAllRequest request
      Returns:
      a CompletionStage that completes after executing the PutAllRequest request
    • putIfAbsent

      public void putIfAbsent(com.oracle.coherence.grpc.messages.cache.v0.PutIfAbsentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Specified by:
      putIfAbsent in interface NamedCacheService
    • putIfAbsent

      protected CompletableFuture<com.google.protobuf.BytesValue> putIfAbsent(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.PutIfAbsentRequest,Void> holder)
      Execute a PutIfAbsentRequest request.
      Parameters:
      holder - the CacheRequestHolder containing the PutIfAbsentRequest request
      Returns:
      a CompletionStage that completes with a BytesValue containing the serialized result of executing the PutIfAbsentRequest request
    • remove

      public void remove(com.oracle.coherence.grpc.messages.cache.v0.RemoveRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Specified by:
      remove in interface NamedCacheService
    • remove

      protected CompletableFuture<com.tangosol.util.Binary> remove(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.RemoveRequest,Void> holder)
      Execute a RemoveRequest request.
      Parameters:
      holder - the CacheRequestHolder containing the RemoveRequest request
      Returns:
      a CompletionStage that completes with a Binary containing the serialized result of executing the RemoveRequest request
    • removeIndex

      public void removeIndex(com.oracle.coherence.grpc.messages.cache.v0.RemoveIndexRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
      Specified by:
      removeIndex in interface NamedCacheService
    • removeMapping

      public void removeMapping(com.oracle.coherence.grpc.messages.cache.v0.RemoveMappingRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Specified by:
      removeMapping in interface NamedCacheService
    • removeMapping

      protected CompletionStage<com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.RemoveMappingRequest,Boolean>> removeMapping(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.RemoveMappingRequest,Void> holder)
      Execute the RemoveMappingRequest request and return a CompletionStage that will complete when the AsyncNamedCache request completes and will contain a CacheRequestHolder holding the result of the RemoveMappingRequest request as a serialized Boolean.
      Parameters:
      holder - the CacheRequestHolder containing the RemoveMappingRequest request
      Returns:
      a CompletionStage that completes with a CacheRequestHolder containing the serialized Binary result of executing the RemoveMappingRequest request
    • replace

      public void replace(com.oracle.coherence.grpc.messages.cache.v0.ReplaceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Specified by:
      replace in interface NamedCacheService
    • replace

      protected CompletableFuture<com.tangosol.util.Binary> replace(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ReplaceRequest,Void> holder)
      Execute a ReplaceRequest request.
      Parameters:
      holder - the CacheRequestHolder containing the ReplaceRequest request
      Returns:
      a CompletionStage that completes with a Binary containing the serialized result of executing the ReplaceRequest request
    • replaceMapping

      public void replaceMapping(com.oracle.coherence.grpc.messages.cache.v0.ReplaceMappingRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> observer)
      Specified by:
      replaceMapping in interface NamedCacheService
    • replaceMapping

      protected CompletableFuture<com.tangosol.util.Binary> replaceMapping(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ReplaceMappingRequest,Void> holder)
      Execute a ReplaceMappingRequest request.
      Parameters:
      holder - the CacheRequestHolder containing the ReplaceMappingRequest request
      Returns:
      a CompletionStage that completes with a Binary containing the serialized result of executing the ReplaceMappingRequest request
    • size

      public void size(com.oracle.coherence.grpc.messages.cache.v0.SizeRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Int32Value> observer)
      Specified by:
      size in interface NamedCacheService
    • truncate

      public void truncate(com.oracle.coherence.grpc.messages.cache.v0.TruncateRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> observer)
      Specified by:
      truncate in interface NamedCacheService
    • 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
    • values

      protected Void values(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.ValuesRequest,Void> holder, io.grpc.stub.StreamObserver<com.google.protobuf.BytesValue> observer)
      Execute the ValuesRequest request passing the results to the provided StreamObserver.
      Parameters:
      holder - the CacheRequestHolder containing the ValuesRequest
      observer - the StreamObserver which will receive the results
      Returns:
      always returns Void
    • convertKeys

      protected CompletionStage<List<com.tangosol.util.Binary>> convertKeys(com.oracle.coherence.grpc.v0.CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.GetAllRequest,Void> holder)
      Convert the keys for a GetAllRequest from the request's serialization format to the cache's serialization format.
      Parameters:
      holder - the CacheRequestHolder containing the GetAllRequest containing the keys to convert
      Returns:
      A CompletionStage that completes with the converted keys