com.esri.arcgis.server
Class IServerStatisticsProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.server.IServerStatisticsProxy
All Implemented Interfaces:
IServerStatistics, Externalizable, Serializable

public class IServerStatisticsProxy
extends com.esri.arcgis.interop.Dispatch
implements IServerStatistics, Serializable

Provides access to members that report statistics for a GIS server to administrators.

Remarks

As the GIS server creates and destroys server objects, handles client requests and so on, statistics about these events are logged in the GIS server's logs. In addition to the log, statistics are also kept in memory and can be queried using the IServerStatistcs interface. The IServerStatistics interface is a supported interface on ServerObjectAdmin.

You can query the GIS server for statistics on the following events described by esriServerStatEvent:

Value Description

esriSSEContextCreated

A client made a call to CreateServerContext on IServerObjectManager and got a reference to a server context.

esriSSEContextCreationFailed

CreateServerContext failed due to an error. Errors will be logged in tht e GIS server's log files.

esriSSEContextCreationTimeout

CreateServerContext timed out because there we no available server objects for the requested configuration for a duration linger than the server object configuration's WaitTimeout.

esriSSEContextReleased

A client released the server context by calling ReleaseServerContext. The time measured is the time the client held onto the context (the time between when they called CreateServerContext and got a reference to the server context, and the time they released the context by calling ReleaseServerContext).

esriSSEContextUsageTimeout

A client did not release the server context by calling ReleaseServerContext before the context's server object configuration's UsageTimeout was reached.

esriSSEServerObjectCreated

A new server object was created. This can happen when a pooled configuration is started and the object pool is populated, when a server object is recycled, or in response to a call to CreateServerContext. The time measured is the time to create the server object instance.

esriSSEServerObjectCreationFailed

The creation of a new server object instance failed due to an error. Errors will be logged in tht e GIS server's log files.

You can query these events using the statistical functions described by esriServerStatFunction :

esriSSFCount
esriSSFMinimum
esriSSFMaximum
esriSSFSum
esriSSFSumSquares
esriSSFMean
esriSSFStandardDeviation

Note: for esriSSEContextCreationFailed, esriSSEContextCreationTimeout, esriSSEContextUsageTimeout and esriSSEServerObjectCreationFailed , the only relevant statistical function is esriSSFCount , as these events do not have time associated with them. The other functions reflect the statistics of the elapsed time associated with the event.

While the GIS server's logs maintain a record of all events in the server, the set of statistics that are in memory and that can be queried are accumulated summaries of time slices since the GIS server was started. The granularity of these time slices is more coarse the futher back in time you go. These statistics can be queried for the following time intervals:

Each time period is an accumulated total of the statistics for that time period. For example, if you query for the total number of request to create server contexts for the last 30 days, you would get statistics from now to the begning of the day 30 days ago (not to the current time on that day). This is because the in memory statistcs have been combined for that entire day.

This means that you may actually get statistics for a longer period that you speficied in your query. When you query the GIS server for statistics, you can use the IServerTimeRange interface to get a report of the actual time period that your queries results reflect.

The IServerStatistics interface has methods for querying a specific statistical function for an event, or for querying all statistical functions for an event:

Use the GetSpecificStatisticForTimeIntervals method to query the GIS server for a specific statistic for an event at descrete time intervals. For example you can use this method to get the count of all server contexts that were created for each minute of the last hour.

Use the GetAllStatisticsForTimeInterval to query the GIS server for all statistics for an event. For example you can use this method to get the sum, mean, etc of server contexts usage time for the last 2 days.

These methods can be used to query based on the the events occuring in the server as a whole (i.e. accross all host machines), or for those occuring on a specific host machine. Additionally, these methods can be used to query based on the events using all server objects, or for events on a particular server object.

You specify the time interval for which you want to query using an index of time periods relative to the current time based on the time period described by esriServerTimePeriod. The index argument to the GetSpecificStatisticForTimeIntervals and GetAllStatisticsForTimeInterval methods describes the index of the time period to start from, and the length argument describes the number of time periods to query.

For example, to query for all statics in the last 2 hours, specify a time period of esriSTPHour, an index of 0 and a length of 2.

To query for all statistics since the server started, specify a time period of esriSTPNone, an index of 0 and a length of 1.

If you are unsure of the actual time period that the results of your query reflect, use the IServerTimeRange interface to get a report of the actual time period that your queries results reflect.

Use the Reset method to clear the statistics in memory.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IServerStatisticsProxy()
           
  IServerStatisticsProxy(Object obj)
           
protected IServerStatisticsProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 IStatisticsResults getAllStatisticsForTimeInterval(int event, int period, int index, int length, String name, String type, String machine)
          Gets a set of statistics, such as count, min, max, mean for an event (such as context usage time) for a specified time period.
 IDoubleArray getSpecificStatisticForTimeIntervals(int event, int function, int period, int index, int length, String name, String type, String machine)
          Gets a specific statistic (such as total count of server contexts created) for a specified time period.
 void removeListener(String iidStr, Object theListener)
           
 void reset()
          Clears out the currently gathered statistics.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IServerStatisticsProxy

public IServerStatisticsProxy()

IServerStatisticsProxy

public IServerStatisticsProxy(Object obj)
                       throws IOException
Throws:
IOException

IServerStatisticsProxy

protected IServerStatisticsProxy(Object obj,
                                 String iid)
                          throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

reset

public void reset()
           throws IOException,
                  AutomationException
Clears out the currently gathered statistics.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
reset in interface IServerStatistics
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpecificStatisticForTimeIntervals

public IDoubleArray getSpecificStatisticForTimeIntervals(int event,
                                                         int function,
                                                         int period,
                                                         int index,
                                                         int length,
                                                         String name,
                                                         String type,
                                                         String machine)
                                                  throws IOException,
                                                         AutomationException
Gets a specific statistic (such as total count of server contexts created) for a specified time period.

Remarks

Use the GetSpecificStatisticForTimeIntervals method to query the GIS server for a specific statistic for an event at descrete time intervals. For example you can use this method to get the count of all server contexts that were created for each minute of the last hour.

The server event is specified by the event argument, and the statistical function to qeury is specified by the function argument.

This method can be used to query based on the the events occuring in the server as a whole (i.e. accross all host machines), or for those occuring on a specific host machine. Additionally, these methods can be used to query based on the events using all server objects, or for events on a particular server object.

To specify a specific machine, specify its name for the machine argument. For all machines, use a blank string for the machine argument.

To specify a specific server object, specify its name for the Name argument and type for the Type argument. For all server objects, use a blank string for both name and type.

You specify the time interval for which you want to query using an index of time periods relative to the current time based on the time period described by esriServerTimePeriod. The index argument to the GetSpecificStatisticForTimeIntervals method describes the index of the time period to start from, and the length argument describes the number of time periods to query.

For example, to query for statics for each hour in the last 2 hours, specify a time period of esriSTPHour, an index of 0 and a length of 2.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSpecificStatisticForTimeIntervals in interface IServerStatistics
Parameters:
event - A com.esri.arcgis.server.esriServerStatEvent constant (in)
function - A com.esri.arcgis.server.esriServerStatFunction constant (in)
period - A com.esri.arcgis.server.esriServerTimePeriod constant (in)
index - The index (in)
length - The length (in)
name - The name (in)
type - The type (in)
machine - The machine (in)
Returns:
A reference to a com.esri.arcgis.system.IDoubleArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAllStatisticsForTimeInterval

public IStatisticsResults getAllStatisticsForTimeInterval(int event,
                                                          int period,
                                                          int index,
                                                          int length,
                                                          String name,
                                                          String type,
                                                          String machine)
                                                   throws IOException,
                                                          AutomationException
Gets a set of statistics, such as count, min, max, mean for an event (such as context usage time) for a specified time period.

Remarks

Use the GetAllStatisticsForTimeInterval to query the GIS server for all statistics for an event. For example you can use this method to get the sum, mean, etc of server contexts usage time for the last 2 days.

The server event is specified by the event argument, and the statistical function to qeury is specified by the function argument.

This method can be used to query based on the the events occuring in the server as a whole (i.e. accross all host machines), or for those occuring on a specific host machine. Additionally, these methods can be used to query based on the events using all server objects, or for events on a particular server object.

To specify a specific machine, specify its name for the machine argument. For all machines, use a blank string for the machine argument.

To specify a specific server object, specify its name for the Name argument and type for the Type argument. For all server objects, use a blank string for both name and type.

You specify the time interval for which you want to query using an index of time periods relative to the current time based on the time period described by esriServerTimePeriod. The index argument to the GetAllStatisticsForTimeInterval method describes the index of the time period to start from, and the length argument describes the number of time periods to query.

For example, to query for all statics in the last 2 hours, specify a time period of esriSTPHour, an index of 0 and a length of 2.

To query for all statistics since the server started, specify a time period of esriSTPNone, an index of 0 and a length of 1.

If you are unsure of the actual time period that the results of your query reflect, use the IServerTimeRange interface to get a report of the actual time period that your queries results reflect.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAllStatisticsForTimeInterval in interface IServerStatistics
Parameters:
event - A com.esri.arcgis.server.esriServerStatEvent constant (in)
period - A com.esri.arcgis.server.esriServerTimePeriod constant (in)
index - The index (in)
length - The length (in)
name - The name (in)
type - The type (in)
machine - The machine (in)
Returns:
A reference to a com.esri.arcgis.system.IStatisticsResults
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.