com.gemstone.gbjgci

## Class GbjGciInterface

- java.lang.Object
- - com.gemstone.gbjgci.GbjGciInterface

-     public class GbjGciInterface
      extends java.lang.Object

  GbjGciInterface provides the low-level interface to the GemStone GCI.

  The only public methods that customer applications should directly call are:

  - getFormat()
  - gciVersion()

  All other functionality is either protected and is intended to be accessed though GbjGciSession, or a call to the GCSI layer and should be accessed through package gbjstats classes. See documentation for those classes for details.

  Version:
    3.1

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `format` Indicates GS/S product oop format.
    `static java.lang.String` | `GBJGCI_VERSION` String representing the GbjGci version
    `static boolean` | `isAndroid` Boolean flag indicating if we're running on Android
    `static boolean` | `isBigEndian` Boolean flag indicating if host is big-endian
    `static long[]` | `kernelOops` Kernel oops.
    `static long` | `OOP_NIL` oop of nil

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `gciVersion()` Return the GCI version string.
    `static int` | `GCSIattach(java.lang.String stoneName)` Attach to a particular shared page cache on this host.
    `static void` | `GCSIdetach()` Detach from an attached shared page cache.
    `static GbjGciCacheStats` | `GCSIgetStats(int index)` Return back the cache statistics sampled earlier for a particular process.
    `static GbjGciCacheStats` | `GCSIgetStats(long pid, GbjGciCacheStats stats)` Return back the cache statistics sampled earlier for a particular process.
    `static void` | `GCSIinitialize()` Initialize the GCSI (GCI Cache Statistics Interface).
    `static int` | `GCSIsampleStats(long[] processIds)` Take a sample of cache stats for all processes on this cache.
    `static java.lang.String[][]` | `GCSIstatNames()` Return a String[][] containing cache statistic names.
    `static int` | `getFormat()` Return 32/641/642, depending on the associated GS/S product oop format.
    `static int` | `initialize(boolean useLinked, java.lang.String appName, int bufSize, int preloadSize, int maxSessions, java.lang.Class objectClass)` Initialize the GbjGciInterface, returning 32/641/642 depending on the underlying GS product oop format.
    `static void` | `serverContinue(GbjSession sess, int sessionId, GbjGciReport process, boolean errFlag, GbjGciReport stResult, GbjGciReport jvResult, java.lang.String errMsg, java.lang.String errStack)` Return control back to the server after handling a client forwarder error.
    `static java.util.logging.Logger` | `setupLogger(java.lang.Class loggerClass)` Setup Logging for gbjgci/gbj/gbjstat classes

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

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

- - ### Field Detail

    - #### format

          public static int format

      Indicates GS/S product oop format.

      GS/64 2.X and later: 642

    - #### GBJGCI_VERSION

          public static final java.lang.String GBJGCI_VERSION

      String representing the GbjGci version
      See Also:
        Constant Field Values

    - #### isAndroid

          public static final boolean isAndroid

      Boolean flag indicating if we're running on Android
      See Also:
        Constant Field Values

    - #### isBigEndian

          public static final boolean isBigEndian

      Boolean flag indicating if host is big-endian
      See Also:
        Constant Field Values

    - #### OOP_NIL

          public static final long OOP_NIL

      oop of nil
      See Also:
        Constant Field Values

    - #### kernelOops

          public static long[] kernelOops

      Kernel oops. Used internally to initialize GbjKernelObjects

  - ### Method Detail

    - #### setupLogger

          public static java.util.logging.Logger setupLogger(java.lang.Class loggerClass)

      Setup Logging for gbjgci/gbj/gbjstat classes
      Parameters:
        `loggerClass` - Class
      Returns:
        instance of Logger

    - #### initialize

          public static int initialize(boolean useLinked,
                                       java.lang.String appName,
                                       int bufSize,
                                       int preloadSize,
                                       int maxSessions,
                                       java.lang.Class objectClass)

      Initialize the GbjGciInterface, returning 32/641/642 depending on the underlying GS product oop format.

      Applications should call GbjSession.initialize( ). See GbjSession.initialize( ) for details and parameter usage.

      Parameters:
        `useLinked` - See GbjSession.initialize( ) , must be true
        `appName` - See GbjSession.initialize( )
        `bufSize` - See GbjSession.initialize( )
        `preloadSize` - See GbjSession.initialize( )
        `maxSessions` - See GbjSession.initialize( )
        `objectClass` - See GbjSession.initialize( )

      Returns:
        The integer 32/641/642 depending on the type of GS product. 32 for GS/S, 641 for GS/64 version 1.X, and 642 for GS/64 versions 2.X and later.
      Throws:
        `GbjException` - if there is an error in server execution

    - #### getFormat

          public static int getFormat()

      Return 32/641/642, depending on the associated GS/S product oop format.
      Returns:
        642 GS/64 versions 2.X and later: 642

    - #### gciVersion

          public static java.lang.String gciVersion()

      Return the GCI version string.
      Returns:
        the GCI version string.
      Throws:
        `GbjException` - if there is an error in server execution

    - #### serverContinue

          public static void serverContinue(GbjSession sess,
                                            int sessionId,
                                            GbjGciReport process,
                                            boolean errFlag,
                                            GbjGciReport stResult,
                                            GbjGciReport jvResult,
                                            java.lang.String errMsg,
                                            java.lang.String errStack)

      Return control back to the server after handling a client forwarder error.

      This method should only be used by GbjSession.

    - #### GCSIinitialize

          public static void GCSIinitialize()

      Initialize the GCSI (GCI Cache Statistics Interface).

      This method should only be used by package gbjstats classes.

      Throws:
        `GbjException` - if there is an error in server execution

    - #### GCSIstatNames

          public static java.lang.String[][] GCSIstatNames()

      Return a String[][] containing cache statistic names.

      This method should only be used by package gbjstats classes.

      First index is by type, second is by particular cache stat.

      Returns:
        A String[][] containing cache stat names
      Throws:
        `GbjException` - if there is an error in server execution

    - #### GCSIattach

          public static int GCSIattach(java.lang.String stoneName)

      Attach to a particular shared page cache on this host.

      This method should only be used by package gbjstats classes.

      Parameters:
        `stoneName` - Name of the stone (or the stone associated with this remote SPC)
      Returns:
        Maximum number of processes that can attach to this cache (can be used to size arrays used to hold pid data returned by GCSIsampleStats( ) )
      Throws:
        `GbjException` - if there is an error in server execution

    - #### GCSIdetach

          public static void GCSIdetach()

      Detach from an attached shared page cache.

      This method should only be used by package gbjstats classes.

      Throws:
        `GbjException` - if there is an error in server execution

    - #### GCSIsampleStats

          public static int GCSIsampleStats(long[] processIds)

      Take a sample of cache stats for all processes on this cache.

      This method should only be used by package gbjstats classes.

      Note that this only takes the sample -- use GCSIgetStats( ) to return the actual sampled statistics.

      Parameters:
        `processIds` - A long[] to hold the returned process ID's of the sampled sessions.
      Returns:
        The actual number of sessions that were sampled.
      Throws:
        `GbjException` - if there is an error in server execution

    - #### GCSIgetStats

          public static GbjGciCacheStats GCSIgetStats(long pid,
                                                      GbjGciCacheStats stats)

      Return back the cache statistics sampled earlier for a particular process.

      This method should only be used by package gbjstats classes.

      Parameters:
        `pid` - The ID of the process of interest.
        `stats` - A GbjGciCacheStats object to hold the returned cache stats.
      Returns:
        The GbjGciCacheStats object passed in above.
      Throws:
        `GbjException` - if there is an error in server execution

    - #### GCSIgetStats

          public static GbjGciCacheStats GCSIgetStats(int index)

      Return back the cache statistics sampled earlier for a particular process.

      This method should only be used by package gbjstats classes.

      Parameters:
        `index` - A numeric index for indexing through a batch of sampled stats. Should be less than the max value returned by GCSIsampleStats( ).
      Returns:
        A GbjGciCacheStats object containg the cache stats.
      Throws:
        `GbjException` - if there is an error in server execution