Class GridConnection

java.lang.Object
com.scaleout.client.GridConnection

public abstract class GridConnection extends Object

Represents connection(s) to one or more servers in a ScaleOut in-memory data grid.

A GridConnection instance is thread-safe, long-lived, and maintains a pool of TCP connections to a ScaleOut in-memory data grid. Multiple Cache instances should use the same GridConnection instance if they are connecting to the same ScaleOut in-memory data grid.

Multiple GridConnection's can be used for a single client to connect to many ScaleOut in-memory data grids.

  • Method Details

    • connect

      public static GridConnection connect(String connectionString) throws GridConnectException

      Connects to a ScaleOut in-memory data grid, returning a GridConnection instance that can be used with a CacheBuilder to create a Cache and access objects in the ScaleOut in-memory data grid.

      Parameters:
      connectionString - String containing parameters for connecting to ScaleOut host(s).
      Returns:
      a GridConnection instance
      Throws:
      GridConnectException - if an error occurs when connecting to a host, invalid parameters in the connection string, or there are no ScaleOut hosts available.