public class GbjGciInterface extends Object
The only public methods that customer applications should directly call are:
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.
Modifier and Type | Field and Description |
---|---|
static int |
format
Indicates GS/S product oop format.
|
static String |
GBJGCI_VERSION
String representing the GbjGci version
|
static boolean |
isAndroid
Boolean flag indicating if we're running on Android
|
static long[] |
kernelOops
Kernel oops.
|
Modifier and Type | Method and Description |
---|---|
static String |
gciVersion()
Return the GCI version string.
|
static int |
GCSIattach(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 String[][] |
GCSIstatNames()
Return a String[][] containing cache statistic names.
|
static int |
getFormat()
Return 32/641/642, depending on the associated GS/S product.
|
static int |
initialize(boolean useLinked,
String appName,
int bufSize,
int preloadSize,
int maxSessions,
Class objectClass)
Initialize the GbjGciInterface, returning 32/641/642 depending on the
underlying GS product oop format.
|
static void |
serverContinue(int sessionId,
GbjGciReport process,
boolean errFlag,
GbjGciReport jvResult,
String errMsg,
String errStack)
Return control back to the server after handling a client forwarder error.
|
static Logger |
setupLogger(Class loggerClass)
Setup Logging for gbjgci/gbj/gbjstat classes
|
public static int format
GS/S: 32
GS/64 1.X: 641
GS/64 2.X and later: 642
public static final String GBJGCI_VERSION
public static boolean isAndroid
public static long[] kernelOops
public static Logger setupLogger(Class loggerClass)
public static int initialize(boolean useLinked, String appName, int bufSize, int preloadSize, int maxSessions, Class objectClass)
useLinked
- If true, first session login is linked.
Normally, GCI sessions are logged in RPC. If the useLinked
flag is set to true, the first session will be Linked (refer to GS/S
documentation for further details on RPC/linked sessions). Default is false.appName
- Optional application name.
The name that is displayed in the GS/S session cache statistics
and statmonitor/VSD output for this gem process. For Android, the appName
is also used to help locate the GemStone libssl library, and should match
the Android application name, but with all lower-case letters.
Default is "GbjApplication".bufSize
- Maximum size (in bytes) for internal byte/oop buffers.
The maximum number of bytes that can be transfered in a single
getOops()/getNamedOops()/getBytes() operation. Exceeding this value will
trigger a GbjGciException. The value is used to allocate internal buffers
for storage during transfer.
Default is 100000.preloadSize
- Maximum size (in bytes) for initial preload of objects
When an object is initially fetched from the server, this
parameter specifies how many bytes are preloaded with the initial fetch.
These are cached, and subsequent getOops()/getNamedOops()/getBytes()
calls can retrieve their results from this cache if available. Application
developers can tune performance by sizing this as appropriate -- larger
sizes will improve the performance of subsequent getX operations at the
expense of a slower initial object fetch. 1000 bytes is a good starting value.
Default is 1000.maxSessions
- Maximum number of sessions that will be run on this Stone.
This should be equal to or greater than the setting of the stone configuration
file parameter STN_MAX_SESSIONS.
Default is 1000.objectClass
- Specifies class of object to return (default is GbjGciObject).
Defines what class of object is returned from various
operations. If the Application developer extends GbjGciObject/GbjObject,
s/he can supply the appropriate application class so that results are
returned appropriately.
Default is Object.class.GbjGciException
public static int getFormat()
GbjGciException
-
GS/S: 32
GS/64 versions 1.X: 641
GS/64 versions 2.X: 642
public static String gciVersion()
GbjGciException
public static void serverContinue(int sessionId, GbjGciReport process, boolean errFlag, GbjGciReport jvResult, String errMsg, String errStack)
This method should only be used by GbjSession.
GbjGciException
public static void GCSIinitialize()
This method should only be used by package gbjstats classes.
GbjGciException
public static String[][] GCSIstatNames()
This method should only be used by package gbjstats classes.
First index is by type, second is by particular cache stat.
GbjGciException
public static int GCSIattach(String stoneName)
This method should only be used by package gbjstats classes.
stoneName
- Name of the stone
(or the stone associated with this remote SPC)GbjGciException
public static void GCSIdetach()
This method should only be used by package gbjstats classes.
GbjGciException
public static int GCSIsampleStats(long[] processIds)
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.
processIds
- A long[] to hold the returned process ID's of the
sampled sessions.GbjGciException
public static GbjGciCacheStats GCSIgetStats(long pid, GbjGciCacheStats stats)
This method should only be used by package gbjstats classes.
pid
- The ID of the process of interest.stats
- A GbjGciCacheStats object to hold the returned cache stats.GbjGciException
public static GbjGciCacheStats GCSIgetStats(int index)
This method should only be used by package gbjstats classes.
index
- A numeric index for indexing through a batch of sampled stats.
Should be less than the max value returned by GCSIsampleStats( ).GbjGciException