com.gemstone.gbj

## Class GbjParameters

- java.lang.Object
- - com.gemstone.gbj.GbjParameters

- All Implemented Interfaces:
    java.io.Serializable

      public class GbjParameters
      extends java.lang.Object
      implements java.io.Serializable

  Instances of this class are used to specify the information needed to configure a GemStone session. Information in a GbjParameters is used for initial session configuration only. A session must be disconnected and connected again to have it recognize changes in the GbjParameters used to configure it.

  ### GBJ30 Changes

  The following fields have been deprecated and no longer have any effect on the session:
  - String brokerMachine
  - int brokerPort
  - int connectTimeout
  - int timeout
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `AUTOMATIC_TRANSACTIONS` Constant for automatic transaction mode
    `static int` | `AutomaticTransactions` Use this value in transactionMode to specify chained (automatic) transaction mode.
    `java.lang.String` | `brokerMachine` Deprecated. As of GBJ30, this parameter has no effect.
    `int` | `brokerPort` Deprecated. As of GBJ30, this parameter has no effect.
    `int` | `connectTimeout` Deprecated. As of GBJ30, this parameter has no effect.
    `static java.lang.String` | `DEFAULT_BROKER_MACHINE` Deprecated. As of GBJ30, this constant is irrelevant
    `static int` | `DEFAULT_BROKER_PORT` Deprecated. As of GBJ30, this constant is irrelevant
    `static int` | `DEFAULT_CONNECTION_TIMEOUT` Deprecated. As of GBJ30, this constant is irrelevant
    `static int` | `DEFAULT_FORMAT` Constant for the default oop format (FORMAT32)
    `static int` | `DEFAULT_TIMEOUT` Deprecated. As of GBJ30, this constant is irrelevant
    `static int` | `DEFAULT_TRANSACTION_MODE` Constant for default transaction mode (manual)
    `int` | `format` The oop format for this connection.
    `static int` | `FORMAT642`
    `java.lang.String` | `gemnetName` The GemStone gem service, must be the default value of "gcilnkobj" in this jar.
    `static int` | `MANUAL_TRANSACTIONS` Constant for manual transaction mode
    `static int` | `ManualTransactions` Use this value in transactionMode to specify explicit (manual) transaction mode.
    `java.lang.String` | `password` The GemStone account password
    `java.lang.String` | `serverName` The NRS of the GemStone server (stone process)
    `java.lang.String` | `serverOSPassword` The server operating system account password
    `java.lang.String` | `serverOSUserName` A server operating system account name may be given to cause the session to run in an alternate account on the server.
    `int` | `timeout` Deprecated. As of GBJ30, this parameter has no effect.
    `static int` | `Transactionless` Use this value in transactionMode to specify that the server will not perform transactions.
    `static int` | `TRANSACTIONLESS` Constant for transactionless mode
    `int` | `transactionMode` The transaction mode.
    `java.lang.String` | `userName` The GemStone account User ID.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GbjParameters()` The default parameters specify an anonymous connection with read-only access and a 15 minute timeout.

  - ### Method Summary

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

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

- - ### Field Detail

    - #### FORMAT642

          public static final int FORMAT642

      See Also:
        Constant Field Values

    - #### DEFAULT_BROKER_MACHINE

          @Deprecated
          public static final java.lang.String DEFAULT_BROKER_MACHINE

      Deprecated. As of GBJ30, this constant is irrelevant
      See Also:
        Constant Field Values

    - #### DEFAULT_BROKER_PORT

          @Deprecated
          public static final int DEFAULT_BROKER_PORT

      Deprecated. As of GBJ30, this constant is irrelevant
      See Also:
        Constant Field Values

    - #### DEFAULT_CONNECTION_TIMEOUT

          @Deprecated
          public static final int DEFAULT_CONNECTION_TIMEOUT

      Deprecated. As of GBJ30, this constant is irrelevant
      See Also:
        Constant Field Values

    - #### DEFAULT_TIMEOUT

          @Deprecated
          public static final int DEFAULT_TIMEOUT

      Deprecated. As of GBJ30, this constant is irrelevant
      See Also:
        Constant Field Values

    - #### MANUAL_TRANSACTIONS

          public static final int MANUAL_TRANSACTIONS

      Constant for manual transaction mode
      See Also:
        Constant Field Values

    - #### AUTOMATIC_TRANSACTIONS

          public static final int AUTOMATIC_TRANSACTIONS

      Constant for automatic transaction mode
      See Also:
        Constant Field Values

    - #### TRANSACTIONLESS

          public static final int TRANSACTIONLESS

      Constant for transactionless mode
      See Also:
        Constant Field Values

    - #### DEFAULT_TRANSACTION_MODE

          public static final int DEFAULT_TRANSACTION_MODE

      Constant for default transaction mode (manual)
      See Also:
        Constant Field Values

    - #### DEFAULT_FORMAT

          public static final int DEFAULT_FORMAT

      Constant for the default oop format (FORMAT32)
      See Also:
        Constant Field Values

    - #### format

          public int format

      The oop format for this connection.

    - #### timeout

          @Deprecated
          public int timeout

      Deprecated. As of GBJ30, this parameter has no effect.
      The amount of time in seconds that an idle connection will remain open. If zero, the connection will not time out. The default is 900 seconds (15 minutes).

    - #### connectTimeout

          @Deprecated
          public int connectTimeout

      Deprecated. As of GBJ30, this parameter has no effect.
      The amount of time in seconds that may elapse before a request for connection must be fulfilled by the session broker. The default is 150 seconds. The session broker running in the server should be given a connect timeout that is smaller than the value given here or the client may timeout before the server. This will result in the loss of database login failure information.

    - #### transactionMode

          public int transactionMode

      The transaction mode. Use the constants ManualTransactions, AutomaticTransactions, or Transactionless as the value for transactionMode. This determines the way in which transactions are started in a GemStone session. The default is MANUAL_TRANSACTIONS.

    - #### serverName

          public java.lang.String serverName

      The NRS of the GemStone server (stone process)

    - #### gemnetName

          public java.lang.String gemnetName

      The GemStone gem service, must be the default value of "gcilnkobj" in this jar.

    - #### userName

          public java.lang.String userName

      The GemStone account User ID. This is a required parameter. Login will fail if it is not set to a valid user account ID.

    - #### password

          public transient java.lang.String password

      The GemStone account password

    - #### brokerMachine

          @Deprecated
          public java.lang.String brokerMachine

      Deprecated. As of GBJ30, this parameter has no effect.
      The broker machine IP address or name. This is a service that locates and configures a server session for the interface.

    - #### brokerPort

          @Deprecated
          public int brokerPort

      Deprecated. As of GBJ30, this parameter has no effect.
      The broker port number. Since Java does not support getservbyname() type queries, this must be a hard-coded number instead of a service name.

    - #### serverOSUserName

          public java.lang.String serverOSUserName

      A server operating system account name may be given to cause the session to run in an alternate account on the server. This may be a required field in an installation.

    - #### serverOSPassword

          public transient java.lang.String serverOSPassword

      The server operating system account password

    - #### ManualTransactions

          public static final int ManualTransactions

      Use this value in transactionMode to specify explicit (manual) transaction mode. Transactions in this mode require a "beginTransaction" before modifying persistent objects.
      See Also:
        Constant Field Values

    - #### AutomaticTransactions

          public static final int AutomaticTransactions

      Use this value in transactionMode to specify chained (automatic) transaction mode. A transaction is started when the session connects to the server and new transaction is begun after a commitTransaction or abortTransaction is processed.
      See Also:
        Constant Field Values

    - #### Transactionless

          public static final int Transactionless

      Use this value in transactionMode to specify that the server will not perform transactions. This is intended primarily for idle sessions. Applications may see an inconsistent view of the database.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### GbjParameters

          public GbjParameters()

      The default parameters specify an anonymous connection with read-only access and a 15 minute timeout. The broker machine is set to "localhost" and port 9090.