OpenClovis Logo

Files | Classes | Functions
Cached_ckpt

Files

file  clCachedCkpt.h
 Header file of the Cached Checkpoint which provides a fast lookup for a P2P generated database.

Classes

struct  ClCachedCkptClientSvcInfoT
 Client side data structure. More...
struct  ClCachedCkptDataT
 The type of the CachedCkpt section data. More...
struct  ClCachedCkptSvcInfoT
 Cached Checkpoint global data structure. More...

Functions

ClRcT clCachedCkptFinalize (ClCachedCkptSvcInfoT *serviceInfo)
 Finalizes the Cached Checkpoint service.
ClRcT clCachedCkptInitialize (ClCachedCkptSvcInfoT *serviceInfo, const SaNameT *ckptName, const SaCkptCheckpointCreationAttributesT *ckptAttributes, SaCkptCheckpointOpenFlagsT openFlags, ClUint32T cachSize)
 Initializes the Cached Checkpoint service.
ClRcT clCachedCkptSectionCreate (ClCachedCkptSvcInfoT *serviceInfo, const ClCachedCkptDataT *sectionData)
 Creates a section in the checkpoint.
ClRcT clCachedCkptSectionDelete (ClCachedCkptSvcInfoT *serviceInfo, const ClNameT *sectionName)
 Deletes a section in the checkpoint.
void clCachedCkptSectionGetFirst (ClCachedCkptSvcInfoT *serviceInfo, ClCachedCkptDataT **sectionData, ClUint32T *sectionOffset)
 Gets the first section of the checkpoint.
void clCachedCkptSectionGetNext (ClCachedCkptSvcInfoT *serviceInfo, ClCachedCkptDataT **sectionData, ClUint32T *sectionOffset)
 Gets next section of the checkpoint.
void clCachedCkptSectionRead (ClCachedCkptSvcInfoT *serviceInfo, const ClNameT *sectionName, ClCachedCkptDataT **sectionData)
 Reads a single section.
ClRcT clCachedCkptSectionUpdate (ClCachedCkptSvcInfoT *serviceInfo, const ClCachedCkptDataT *sectionData)
 Updates a checkpoint section.
ClRcT clCachedCkptSynch (ClCachedCkptSvcInfoT *serviceInfo, ClBoolT isEmpty)
 Synchronizes the cache (local copy) with the checkpoint.

Detailed Description

Function Documentation

ClRcT clCachedCkptFinalize ( ClCachedCkptSvcInfoT serviceInfo)

Finalizes the Cached Checkpoint service.

Header File:
clCachedCkpt.h
Parameters:
Parameters
serviceInfo(in) A pointer to the global data structure used by CachedCkpt service. Refer to ClCachedCkptSvcInfoT structure.
Return values
CL_OKThe API executed successfully.
CL_ERR_NOT_INITIALIZEDIf the checkpoint server is not completely initialized.
Description:
This API should be used when an application decides of not using the Cached Checkpoint service any more. The application must have invoked clCachedCkptInitialize() before it invokes this function.
Library Files:
clCachedCkpt
See Also
clCachedCkptInitialize()
ClRcT clCachedCkptInitialize ( ClCachedCkptSvcInfoT serviceInfo,
const SaNameT *  ckptName,
const SaCkptCheckpointCreationAttributesT *  ckptAttributes,
SaCkptCheckpointOpenFlagsT  openFlags,
ClUint32T  cachSize 
)

Initializes the Cached Checkpoint service.

Header File:
clCachedCkpt.h
Parameters:
Parameters
serviceInfo(in) A pointer to the global data structure used by CachedCkpt service. Refer to ClCachedCkptSvcInfoT structure.
ckptName(in) Name of the checkpoint to be opened.
ckptAttributes(in) A pointer to the create attributes of the checkpoint.
openFlags(in) Flags to indicate the desired mode to open. It can have the following values:
  • SA_CKPT_CHECKPOINT_READ
  • SA_CKPT_CHECKPOINT_WRITE
  • SA_CKPT_CHECKPOINT_CREATE
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTERWhen the parameters passed are NULL pointers.
CL_ERR_NOT_INITIALIZEDIf the checkpoint server is not completely initialized.
CL_ERR_ALREADY_EXISTIf the checkpoint is already existing.
CL_ERR_NO_MEMORYIf there is not enough memory.
Description:
This API is used to initialize the Cached Checkpoint service. It must be called before calling any other Cached Checkpoint APIs.
Library Files:
clCachedCkpt
See Also
clCachedCkptFinalize()
ClRcT clCachedCkptSectionCreate ( ClCachedCkptSvcInfoT serviceInfo,
const ClCachedCkptDataT sectionData 
)

Creates a section in the checkpoint.

Header File:
clCachedCkpt.h
Parameters:
Parameters
serviceInfo(in) A pointer to the global data structure used by CachedCkpt service. Refer to ClCachedCkptSvcInfoT structure.
sectionData(in) A pointer to the section data to be stored. Refer to ClCachedCkptDataT structure.
Return values
CL_OKThe API executed successfully.
CL_ERR_NOT_INITIALIZEDIf the checkpoint server is not completely initialized.
CL_ERR_ALREADY_EXISTIf the checkpoint section is already existing.
CL_ERR_NO_MEMORYOn memory allocation failure.
Description:
This API creates a new section in the checkpoint referred to by serviceInfo->ckptHandle and stores its data in the cache (local copy).
Library Files:
clCachedCkpt
See Also
clCachedCkptSectionDelete(), clCachedCkptSectionUpdate()
ClRcT clCachedCkptSectionDelete ( ClCachedCkptSvcInfoT serviceInfo,
const ClNameT sectionName 
)

Deletes a section in the checkpoint.

Header File:
clCachedCkpt.h
Parameters:
Parameters
serviceInfo(in) A pointer to the global data structure used by CachedCkpt service. Refer to ClCachedCkptSvcInfoT structure.
sectionName(in) Name of the section to be deleted.
Return values
CL_OKThe API executed successfully.
CL_ERR_NOT_INITIALIZEDIf the checkpoint server is not completely initialized.
CL_ERR_NO_MEMORYOn memory allocation failure.
Description:
This API deletes a section in the checkpoint referred to by serviceInfo->ckptHandle and remove its data out of the cache (local copy).
Library Files:
clCachedCkpt
See Also
clCachedCkptSectionCreate(), clCachedCkptSectionUpdate()
void clCachedCkptSectionGetFirst ( ClCachedCkptSvcInfoT serviceInfo,
ClCachedCkptDataT **  sectionData,
ClUint32T *  sectionOffset 
)

Gets the first section of the checkpoint.

Header File:
clCachedCkpt.h
Parameters:
Parameters
serviceInfo(in) A pointer to the global data structure used by CachedCkpt service. Refer to ClCachedCkptSvcInfoT structure.
sectionData(out) Pointer to the section data to be read. Refer to ClCachedCkptDataT structure.
sectionOffset(out) Pointer to the offset of the next section
Description:
This API gets the first section of the checkpoint and return section data to the caller.
Library Files:
clCachedCkpt
void clCachedCkptSectionGetNext ( ClCachedCkptSvcInfoT serviceInfo,
ClCachedCkptDataT **  sectionData,
ClUint32T *  sectionOffset 
)

Gets next section of the checkpoint.

Header File:
clCachedCkpt.h
Parameters:
Parameters
serviceInfo(in) A pointer to the global data structure used by CachedCkpt service. Refer to ClCachedCkptSvcInfoT structure.
sectionData(out) Pointer to the section data to be read. Refer to ClCachedCkptDataT structure.
sectionOffset(out) Pointer to the offset of the next section
Description:
This API gets next section of the checkpoint and return section data to the caller.
Library Files:
clCachedCkpt
void clCachedCkptSectionRead ( ClCachedCkptSvcInfoT serviceInfo,
const ClNameT sectionName,
ClCachedCkptDataT **  sectionData 
)

Reads a single section.

Header File:
clCachedCkpt.h
Parameters:
Parameters
serviceInfo(in) A pointer to the global data structure used by CachedCkpt service. Refer to ClCachedCkptSvcInfoT structure.
sectionName(in) Name of the section to be read.
sectionData(out) Pointer to the section data to be read. Refer to ClCachedCkptDataT structure.
Description:
This API reads a single section and return section data to the caller.
Library Files:
clCachedCkpt
ClRcT clCachedCkptSectionUpdate ( ClCachedCkptSvcInfoT serviceInfo,
const ClCachedCkptDataT sectionData 
)

Updates a checkpoint section.

Header File:
clCachedCkpt.h
Parameters:
Parameters
serviceInfo(in) A pointer to the global data structure used by CachedCkpt service. Refer to ClCachedCkptSvcInfoT structure.
sectionData(in) A pointer to the section data to be updated. Refer to ClCachedCkptDataT structure.
Return values
CL_OKThe API executed successfully.
CL_ERR_NOT_INITIALIZEDIf the checkpoint server is not completely initialized.
CL_ERR_NO_MEMORYOn memory allocation failure.
Description:
This API is used to update a single section in the checkpoint. As a result of this invocation, the previous data of the section will change.
Library Files:
clCachedCkpt
See Also
clCachedCkptSectionCreate(), clCachedCkptSectionDelete()
ClRcT clCachedCkptSynch ( ClCachedCkptSvcInfoT serviceInfo,
ClBoolT  isEmpty 
)

Synchronizes the cache (local copy) with the checkpoint.

Header File:
clCachedCkpt.h
Parameters:
Parameters
serviceInfo(in) A pointer to the global data structure used by CachedCkpt service. Refer to ClCachedCkptSvcInfoT structure.
Return values
CL_OKThe API executed successfully.
Description:
This API synchronizes the cache (local copy) with the checkpoint. It is called typically when the checkpoint is updated remotely.
Library Files:
clCachedCkpt

Generated on Tue Jan 10 10:29:15 PST 2012 for OpenClovis SDK using Doxygen