Interface GrpcSessionConfiguration

  • All Superinterfaces:
    Comparable<com.tangosol.net.SessionConfiguration>, com.tangosol.net.SessionConfiguration
    All Known Implementing Classes:
    GrpcSessionConfiguration.DefaultConfiguration

    @Deprecated(since="22.06.2")
    public interface GrpcSessionConfiguration
    extends com.tangosol.net.SessionConfiguration
    Deprecated.
    Configure a grpc-remote-cache-scheme in the cache configuration file.
    A SessionConfiguration that configures a gRPC client session.
    Since:
    20.12
    Author:
    Jonathan Knight 2020.11.04
    • Field Detail

      • DEFAULT_PRIORITY

        static final int DEFAULT_PRIORITY
        Deprecated.
        The default priority for gRPC Sessions. This is lower than the default so that by default gRPC client sessions start after normal sessions as there is more likely to be a dependency between gRPC and CCF sessions.
        See Also:
        Constant Field Values
      • DEFAULT_HOST

        static final String DEFAULT_HOST
        Deprecated.
        The default host name to use for the default channel.
        See Also:
        Constant Field Values
      • PROP_SESSION_ENABLED

        static final String PROP_SESSION_ENABLED
        Deprecated.
        The system property that sets whether a session is enabled.
        See Also:
        Constant Field Values
      • PROP_DEFAULT_SESSION_ENABLED

        static final String PROP_DEFAULT_SESSION_ENABLED
        Deprecated.
        The system property that sets whether the default gRPC session is enabled.
    • Method Detail

      • builder

        static GrpcSessionConfiguration.Builder builder​(io.grpc.Channel channel)
        Deprecated.
        Create a GrpcSessionConfiguration builder.

        Passing in a null channel will create a session using a default channel configuration of localhost:1408. This can be overridden using the GrpcChannelDependencies.PROP_HOST and/or the GrpcChannelDependencies.PROP_PORT system properties. which will create a channel using the ManagedChannelBuilder.forAddress(String, int) method. Alternatively the GrpcChannelDependencies.PROP_TARGET system property can be set to create the channel using the ManagedChannelBuilder.forTarget(String) method.

        Parameters:
        channel - the Channel to use
        Returns:
        a GrpcSessionConfiguration builder
      • builder

        static GrpcSessionConfiguration.Builder builder()
        Deprecated.
        Create a GrpcSessionConfiguration builder for the default gRPC session.

        If coherence.grpc.channels.default.target is set this value will be used to create a channel using ManagedChannelBuilder.forTarget(String) creating a plain text channel.

        If coherence.grpc.channels.default.host is set this value will be used to create a channel using ManagedChannelBuilder.forAddress(String, int) creating a plain text channel. The port will be taken from the coherence.grpc.channels.default.port property or default to 1408.

        The GrpcSessionConfiguration.Builder.build() method will throw an IllegalStateException if no channel properties exist for the channel name

        Returns:
        a GrpcSessionConfiguration builder
      • builder

        static GrpcSessionConfiguration.Builder builder​(String sChannelName)
        Deprecated.
        Create a GrpcSessionConfiguration builder.

        The sChannelName parameter will be used to lookup channel configuration properties. If coherence.grpc.channels.[sChanneName].target is set this value will be used to create a channel using ManagedChannelBuilder.forTarget(String) creating a plain text channel.

        If coherence.grpc.channels.[sChanneName].host is set this value will be used to create a channel using ManagedChannelBuilder.forAddress(String, int) creating a plain text channel. The port will be taken from the coherence.grpc.channels.[sChanneName].port property or default to 1408.

        The GrpcSessionConfiguration.Builder.build() method will throw an IllegalStateException if no channel properties exist for the channel name

        Parameters:
        sChannelName - the name of the channel to use to lookup channel properties
        Returns:
        a GrpcSessionConfiguration builder
      • builder

        static GrpcSessionConfiguration.Builder builder​(String channelName,
                                                        String sFallbackName)
        Deprecated.
        Create a GrpcSessionConfiguration builder.

        The channelName parameter will be used to lookup channel configuration properties. If coherence.grpc.channels.[sChannelName].target is set this value will be used to create a channel using ManagedChannelBuilder.forTarget(String) creating a plain text channel.

        If coherence.grpc.channels.[sChanneName].host is set this value will be used to create a channel using ManagedChannelBuilder.forAddress(String, int) creating a plain text channel. The port will be taken from the coherence.grpc.channels.[sChanneName].port property or default to 1408.

        If no properties exist for the channelName the sFallbackName parameter will be used to lookup channel configuration properties.

        The GrpcSessionConfiguration.Builder.build() method will throw an IllegalStateException if no channel properties exist for the either the channel name or fallback name.

        Parameters:
        channelName - the name of the channel to use to lookup channel properties
        sFallbackName - the name of the channel to use to lookup channel configuration if no properties exist for the primary channelName
        Returns:
        a GrpcSessionConfiguration builder
      • getScopeName

        default String getScopeName()
        Deprecated.
        Specified by:
        getScopeName in interface com.tangosol.net.SessionConfiguration
      • getChannel

        io.grpc.Channel getChannel()
        Deprecated.
        Returns the gRPC Channel to use.
        Returns:
        the gRPC Channel to use
      • getSerializer

        default Optional<com.tangosol.io.Serializer> getSerializer()
        Deprecated.
        Returns the Serializer to use to serialize gRPC message payloads.

        If an empty Optional is returned the serializer will be the default Coherence serializer, either POF if it has been enabled with the coherence.pof.enabled system property, otherwise Java.

        Returns:
        the Serializer to use
      • getFormat

        default Optional<String> getFormat()
        Deprecated.
        Returns the name of the serialization format to use to serialize gRPC message payloads.

        If an empty Optional is returned the serializer format will be taken from the default Coherence serializer, either "pof" if it has been enabled with the coherence.pof.enabled system property, otherwise "java".

        Returns:
        the name of the serialization format
      • enableTracing

        default boolean enableTracing()
        Deprecated.
        Returns true if client gRPC tracing should be enabled.
        Returns:
        true if client gRPC tracing should be enabled