com.hazelcast.nio.tcp

## Class TcpIpNetworkingService

- java.lang.Object
- - com.hazelcast.nio.tcp.TcpIpNetworkingService

- All Implemented Interfaces:
    NetworkingService<TcpIpConnection>

      public class TcpIpNetworkingService
      extends Object
      implements NetworkingService<TcpIpConnection>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TcpIpNetworkingService(Config config, IOService ioService, com.hazelcast.internal.networking.ServerSocketRegistry registry, LoggingService loggingService, com.hazelcast.internal.metrics.MetricsRegistry metricsRegistry, com.hazelcast.internal.networking.Networking networking, com.hazelcast.internal.networking.ChannelInitializerProvider channelInitializerProvider)`
    `TcpIpNetworkingService(Config config, IOService ioService, com.hazelcast.internal.networking.ServerSocketRegistry registry, LoggingService loggingService, com.hazelcast.internal.metrics.MetricsRegistry metricsRegistry, com.hazelcast.internal.networking.Networking networking, com.hazelcast.internal.networking.ChannelInitializerProvider channelInitializerProvider, HazelcastProperties properties)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AggregateEndpointManager` | `getAggregateEndpointManager()` The aggregate endpoint manager acts as a composite of all configured endpoints.
    `EndpointManager<TcpIpConnection>` | `getEndpointManager(EndpointQualifier qualifier)` Returns the respective endpoint manager based on the qualifier.
    `IOService` | `getIoService()` Returns the I/O Service
    `com.hazelcast.internal.networking.Networking` | `getNetworking()` Returns the Networking engine Shared across the multiple (or not) endpoints
    `boolean` | `isLive()` Flag indicating the liveness status of the Network
    `void` | `scheduleDeferred(Runnable task, long delay, TimeUnit unit)` Global scheduler for all Endpoints responsible of message retransmission
    `void` | `shutdown()` Shutdowns the service completely.
    `void` | `start()` Starts the service, initializes its endpoints, starts threads, etc.
    `void` | `stop()` Stops the service, releases its resources, stops threads, etc.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### TcpIpNetworkingService

          public TcpIpNetworkingService(Config config,
                                        IOService ioService,
                                        com.hazelcast.internal.networking.ServerSocketRegistry registry,
                                        LoggingService loggingService,
                                        com.hazelcast.internal.metrics.MetricsRegistry metricsRegistry,
                                        com.hazelcast.internal.networking.Networking networking,
                                        com.hazelcast.internal.networking.ChannelInitializerProvider channelInitializerProvider)

    - #### TcpIpNetworkingService

          public TcpIpNetworkingService(Config config,
                                        IOService ioService,
                                        com.hazelcast.internal.networking.ServerSocketRegistry registry,
                                        LoggingService loggingService,
                                        com.hazelcast.internal.metrics.MetricsRegistry metricsRegistry,
                                        com.hazelcast.internal.networking.Networking networking,
                                        com.hazelcast.internal.networking.ChannelInitializerProvider channelInitializerProvider,
                                        HazelcastProperties properties)

  - ### Method Detail

    - #### getIoService

          public IOService getIoService()

      Description copied from interface: `NetworkingService`
      Returns the I/O Service
      Specified by:
        `getIoService` in interface `NetworkingService<TcpIpConnection>`

    - #### getNetworking

          public com.hazelcast.internal.networking.Networking getNetworking()

      Description copied from interface: `NetworkingService`
      Returns the Networking engine Shared across the multiple (or not) endpoints
      Specified by:
        `getNetworking` in interface `NetworkingService<TcpIpConnection>`

    - #### isLive

          public boolean isLive()

      Description copied from interface: `NetworkingService`
      Flag indicating the liveness status of the Network
      Specified by:
        `isLive` in interface `NetworkingService<TcpIpConnection>`

    - #### start

          public void start()

      Description copied from interface: `NetworkingService`
      Starts the service, initializes its endpoints, starts threads, etc. After start, Endpoints becomes fully operational.

      If it is already started, then this method has no effect.

      Specified by:
        `start` in interface `NetworkingService<TcpIpConnection>`

    - #### stop

          public void stop()

      Description copied from interface: `NetworkingService`
      Stops the service, releases its resources, stops threads, etc. When stopped, Endpoints can be started again using `NetworkingService.start()`.

      This method has no effect if it is already stopped or shutdown.

      Currently `stop` is called during the merge process to detach node from the current cluster. After node becomes ready to join to the new cluster, `start` is called to re-initialize the Endpoints.

      Specified by:
        `stop` in interface `NetworkingService<TcpIpConnection>`

    - #### shutdown

          public void shutdown()

      Description copied from interface: `NetworkingService`
      Shutdowns the service completely. Endpoints and the networking engine will not be operational anymore and cannot be restarted.

      This method has no effect if it is already shutdown.

      Specified by:
        `shutdown` in interface `NetworkingService<TcpIpConnection>`

    - #### getAggregateEndpointManager

          public AggregateEndpointManager getAggregateEndpointManager()

      The aggregate endpoint manager acts as a composite of all configured endpoints. This is never null. In an environment with multiple endpoints, this is a super endpoint that wraps them all and reports total connections or registers listeners to all separate endpoints. Note: You can't create a connection through it, you will have to access the respective endpoint for that. In an environment with a unified endpoint, this will also act as a wrapper on the views of the unified endpoint (see `MemberViewUnifiedEndpointManager` and the others).
      Specified by:
        `getAggregateEndpointManager` in interface `NetworkingService<TcpIpConnection>`
      Returns:

    - #### getEndpointManager

          public EndpointManager<TcpIpConnection> getEndpointManager(EndpointQualifier qualifier)

      Returns the respective endpoint manager based on the qualifier. Under unified endpoint environments, this will return the respective view of the `TcpIpUnifiedEndpointManager` eg. `MemberViewUnifiedEndpointManager` or `ClientViewUnifiedEndpointManager` which report connections based on the qualifier, but they register/create connection directly on the Unified manager.
      Specified by:
        `getEndpointManager` in interface `NetworkingService<TcpIpConnection>`
      Parameters:
        `qualifier` -
      Returns:

    - #### scheduleDeferred

          public void scheduleDeferred(Runnable task,
                                       long delay,
                                       TimeUnit unit)

      Description copied from interface: `NetworkingService`
      Global scheduler for all Endpoints responsible of message retransmission
      Specified by:
        `scheduleDeferred` in interface `NetworkingService<TcpIpConnection>`

Copyright © 2019. All rights reserved.