This documentation supports the 9.1 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.

ARGetCacheEvent

Note

You can continue to use C APIs to customize your application, but C APIs are not enhanced to support new capabilities provided by Java APIs and REST APIs.

Description

Retrieves the list of events that occurred in the BMC Remedy AR System server cache and the number of server caches, and indicates when administrative operations become public. You can direct this API call to either return the results immediately or when the next event occurs. This call is useful for detecting cache events in production cache mode.

A server cache event occurs when you perform an administrative operation (for example, importing a definition file, creating a schema, creating workflow, or creating other BMC Remedy AR System objects). When the operation is performed, BMC Remedy AR System creates a new copy of the server cache (administrative cache) and modifies it. After a brief delay, the old cache is released and the new cache is made public, so that newly created objects are available to users. If multiple operations are performed simultaneously, BMC Remedy AR System creates multiple copies of the administrative cache.

This call differs from other API calls in that it has a default 8 hour timeout.

Privileges

The system returns data based on the access privileges of the user that you specify for the control parameter.

Synopsis

#include "ar.h"

int ARGetCacheEvent(
   ARControlStruct *control,
   ARInternalIdList *eventIdList,
   unsigned int returnOption,
   ARInternalIdList *eventIdOccuredList,
   unsigned int *cacheCount,
   ARStatusList *status)

Input arguments

control

The control record for the operation. It contains information about the user requesting the operation, where that operation is to be performed, and which session is used to perform it. The user and server fields are required.

eventIdList

A list of types of events to return if they have occurred:

1:

Indicates an "admin-only cache created" event. (AR_CACHE_ADMINONLYCREATE_EVENT)

2:

Indicates an "admin-only cache made public" event. (AR_CACHE_ADMINONLYPUBLIC_EVENT)

3:

Indicates an "cache freed" event. (AR_CACHE_FREE_EVENT)

4:

Indicates a "Group re-cache" event. (AR_CACHE_GROUPCHANGEPUBLIC_EVENT)

 

returnOption

Controls whether the call returns immediately or waits for the next event to occur:

0:

Default; the call returns the information immediately. (AR_GCE_OPTION_NONE)

1:

The call waits for the next event to occur before returning the information. (AR_GCE_OPTION_NEXT)

 

In the case of AR_GCE_OPTION_NONE, the server immediately returns with the list of events that are currently true.

In the case of AR_GCE_OPTION_NEXT, the server only returns when one of the events in the list becomes true. At that time, the list of returned events is the one that caused the call to return.

Return values

eventIdOccuredList

The list of types of events that have occurred. The possible events are:

AR_CACHE_ADMINONLYCREATE_EVENT

An admin-only cache has been created.

AR_CACHE_ADMINONLYPUBLIC_EVENT

An admin-only cache has become public.

AR_CACHE_FREE_EVENT

A copy of the cache has been freed.

 

cacheCount

The number of server caches. The call always returns the current number of copies of the cache in memory at the time that it returns.

status

A list of zero or more notes, warnings, or errors generated from a call to this function. For a description of all possible values, see Error checking.

Was this page helpful? Yes No Submitting... Thank you

Comments