OpenClovis Logo

clCkptExtApi.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2012 OpenClovis Solutions Inc. All Rights Reserved.
3  *
4  * This file is available under a commercial license from the
5  * copyright holder or the GNU General Public License Version 2.0.
6  *
7  * The source code for this program is not published or otherwise
8  * divested of its trade secrets, irrespective of what has been
9  * deposited with the U.S. Copyright office.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * For more information, see the file COPYING provided with this
17  * material.
18  */
19 /*******************************************************************************
20  * ModuleName : ckpt
21  * File : clCkptExtApi.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25 * Description :
26 *
27 * Checkpoint service provides more functionality than whatever described
28 * in SAF. This file contains APIs to access such functionality
29 *
30 *
31 *****************************************************************************/
32 
45 #ifndef _CL_CKPT_EXT_API_H_
46 #define _CL_CKPT_EXT_API_H_
47 
48 # ifdef __cplusplus
49 extern "C" {
50 # endif
51 
52 #include <clCommon.h>
53 #include <clCkptApi.h>
54 #include <clCntApi.h>
55 #include <clOsalApi.h>
56 #include <clEoApi.h>
57 #include <clDifferenceVector.h>
58 
63 
67  ClUint32T,
68 
72  ClAddrT *,
73 
77  ClUint32T *, ClPtrT );
81 
82 
87 
91  ClUint32T,
92 
96  ClAddrT ,
97 
101  ClUint32T,
105  ClPtrT );
106 
107 /*
108  * Data set versioned callbacks for serializing and deserializing on-disk data.
109  */
110 typedef struct ClCkptDataSetCallback
111 {
112  ClVersionT version;
113  ClCkptSerializeT serialiser;
114  ClCkptDeserializeT deSerialiser;
115 }ClCkptDataSetCallbackT;
116 
117 typedef struct ClCkptDifferenceIOVectorElement
118 {
122  ClCkptSectionIdT sectionId;
123  ClSizeT dataSize;
124  ClOffsetT dataOffset;
125  ClDifferenceVectorT *differenceVector; /* the dataBuffer difference vector representation*/
126 }ClCkptDifferenceIOVectorElementT;
127 
128 typedef struct ClCkptClientInfo
129 {
130  ClIocNodeAddressT nodeAddress;
131  ClIocPortT portId;
132 } ClCkptClientInfoT;
133 
134 typedef struct ClCkptClientInfoList
135 {
136  ClUint32T numEntries;
137  ClCkptClientInfoT *pClientInfo;
138 } ClCkptClientInfoListT;
139 
140 
168  CL_INOUT ClCkptSvcHdlT *pCkptHdl );
169 
170 extern ClRcT clCkptLibraryInitializeDB(
171  CL_INOUT ClCkptSvcHdlT *pCkptHdl,
172  const ClCharT *dbName);
173 
199 
227  CL_IN ClNameT *pCkptName);
228 
229 
258  CL_IN ClNameT *pCkptName);
259 
260 
300  CL_IN ClNameT *pCkptName,
301  CL_IN ClUint32T dsId,
302  CL_IN ClUint32T grpId,
303  CL_IN ClUint32T order,
304  CL_IN ClCkptSerializeT dsSerialiser,
305  CL_IN ClCkptDeserializeT dsDeserialiser);
306 
307 extern ClRcT clCkptLibraryCkptDataSetVersionCreate( CL_IN ClCkptSvcHdlT ckptHdl,
308  CL_IN ClNameT *pCkptName,
309  CL_IN ClUint32T dsId,
310  CL_IN ClUint32T grpId,
311  CL_IN ClUint32T order,
312  CL_IN ClCkptDataSetCallbackT *pTable,
313  CL_IN ClUint32T numTableEntries);
314 
315 
349  CL_IN ClNameT *pCkptName,
350  CL_IN ClUint32T dsId );
351 
383  CL_IN ClNameT *pCkptName,
384  CL_IN ClUint32T dsId,
385  CL_IN ClPtrT cookie );
386 
387 extern ClRcT clCkptLibraryCkptDataSetVersionWrite(CL_IN ClCkptSvcHdlT ckptHdl,
388  CL_IN ClNameT *pCkptName,
389  CL_IN ClUint32T dsId,
390  CL_IN ClPtrT cookie,
391  CL_IN ClVersionT *pVersion);
392 
424  CL_IN ClNameT *pCkptName,
425  CL_IN ClUint32T dsId,
426  CL_IN ClPtrT cookie);
427 
454  CL_IN ClNameT *pCkptName,
455  CL_OUT ClBoolT *pRetVal);
456 
484  CL_IN ClNameT *pCkptName,
485  CL_IN ClUint32T dsId,
486  CL_OUT ClBoolT *pRetVal);
517  ClNameT *pCkptName,
518  ClUint32T dsId,
519  ClCkptSerializeT elemSerialiser,
520  ClCkptDeserializeT elemDeserialiser);
521 
522 extern ClRcT clCkptLibraryCkptElementVersionCreate(ClCkptSvcHdlT ckptHdl,
523  ClNameT *pCkptName,
524  ClUint32T dsId,
525  ClCkptDataSetCallbackT *pTable,
526  ClUint32T numTableEntries);
527 
561  ClNameT *pCkptName,
562  ClUint32T dsId,
563  ClPtrT elemId,
564  ClUint32T elemLen,
565  ClPtrT cookie);
566 
567 extern ClRcT clCkptLibraryCkptElementVersionWrite (ClCkptSvcHdlT ckptHdl,
568  ClNameT *pCkptName,
569  ClUint32T dsId,
570  ClPtrT elemId,
571  ClUint32T elemLen,
572  ClPtrT cookie,
573  ClVersionT *pVersion);
574 
608  ClNameT *pCkptName,
609  ClUint32T dsId,
610  ClPtrT elemId,
611  ClUint32T elemLen);
612 
613 extern ClRcT clCkptReplicaChangeRegister(ClRcT (*pCkptRelicaChangeCallback)
614  (const ClNameT *pCkptName, ClIocNodeAddressT replicaAddr));
615 
616 extern ClRcT clCkptReplicaChangeDeregister(void);
617 
618 ClRcT clCkptSectionOverwriteVector(ClCkptHdlT ckptHdl,
619  const ClCkptSectionIdT *pSectionId,
620  ClSizeT dataSize,
621  ClDifferenceVectorT *differenceVector);
622 
623 extern ClRcT clCkptCheckpointReadSections(ClCkptHdlT ckptHdl,
624  ClCkptIOVectorElementT **ppIOVecs,
625  ClUint32T *pNumVecs);
626 
627 extern ClRcT clCkptIOVectorFree(ClCkptIOVectorElementT *pIOVec, ClUint32T numVecs);
628 
629 #ifdef __cplusplus
630 }
631 #endif
632 
633 #endif /* _CL_CKPT_EXT_API_H_*/
634 
Typical defines found in any software project.
Header file of Server based Checkpoint Service Related APIs.
Header file of Clovis Container Related APIs.
Header file of EO related APIs.
Operating System Abstraction Layer API.
ClHandleT ClCkptHdlT
The handle used to identify a checkpoint.
Definition: clCkptApi.h:141
ClHandleT ClCkptSvcHdlT
The type of the handle for the the checkpoint service library.
Definition: clCkptApi.h:136
ClRcT clCkptLibraryInitialize(CL_INOUT ClCkptSvcHdlT *pCkptHdl)
Initializes the client.
ClRcT clCkptLibraryCkptElementDelete(ClCkptSvcHdlT ckptHdl, ClNameT *pCkptName, ClUint32T dsId, ClPtrT elemId, ClUint32T elemLen)
Writes the Element information into the database.
ClRcT(* ClCkptDeserializeT)(ClUint32T, ClAddrT, ClUint32T, ClPtrT)
De-serialize Signature.
Definition: clCkptExtApi.h:86
ClRcT clCkptLibraryCkptDataSetDelete(CL_IN ClCkptSvcHdlT ckptHdl, CL_IN ClNameT *pCkptName, CL_IN ClUint32T dsId)
Deletes the dataset from the checkpoint.
ClRcT clCkptLibraryDoesCkptExist(CL_IN ClCkptSvcHdlT ckptHdl, CL_IN ClNameT *pCkptName, CL_OUT ClBoolT *pRetVal)
Checks the existence of a checkpoint.
ClRcT clCkptLibraryDoesDatasetExist(CL_IN ClCkptSvcHdlT ckptHdl, CL_IN ClNameT *pCkptName, CL_IN ClUint32T dsId, CL_OUT ClBoolT *pRetVal)
Checks the existence of a Dataset in a given checkpoint.
ClRcT clCkptLibraryCkptElementCreate(ClCkptSvcHdlT ckptHdl, ClNameT *pCkptName, ClUint32T dsId, ClCkptSerializeT elemSerialiser, ClCkptDeserializeT elemDeserialiser)
Creates the element of the Dataset.
ClRcT clCkptLibraryCkptDelete(CL_IN ClCkptSvcHdlT ckptHdl, CL_IN ClNameT *pCkptName)
Deletes the checkpoint.
ClRcT clCkptLibraryCkptDataSetWrite(CL_IN ClCkptSvcHdlT ckptHdl, CL_IN ClNameT *pCkptName, CL_IN ClUint32T dsId, CL_IN ClPtrT cookie)
Writes the dataset information into the database.
ClRcT clCkptLibraryFinalize(CL_IN ClCkptSvcHdlT ckptHdl)
Destroys the client.
ClRcT clCkptLibraryCkptCreate(CL_IN ClCkptSvcHdlT ckptHdl, CL_IN ClNameT *pCkptName)
Creates the checkpoint.
ClRcT(* ClCkptSerializeT)(ClUint32T, ClAddrT *, ClUint32T *, ClPtrT)
Serialize Signature.
Definition: clCkptExtApi.h:62
ClRcT clCkptLibraryCkptDataSetCreate(CL_IN ClCkptSvcHdlT ckptHdl, CL_IN ClNameT *pCkptName, CL_IN ClUint32T dsId, CL_IN ClUint32T grpId, CL_IN ClUint32T order, CL_IN ClCkptSerializeT dsSerialiser, CL_IN ClCkptDeserializeT dsDeserialiser)
Creates a data set.
ClRcT clCkptLibraryCkptElementWrite(ClCkptSvcHdlT ckptHdl, ClNameT *pCkptName, ClUint32T dsId, ClPtrT elemId, ClUint32T elemLen, ClPtrT cookie)
Writes the Element information into the database.
ClRcT clCkptLibraryCkptDataSetRead(CL_IN ClCkptSvcHdlT ckptHdl, CL_IN ClNameT *pCkptName, CL_IN ClUint32T dsId, CL_IN ClPtrT cookie)
Reads the dataset information into the database.
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
#define CL_INOUT
CL_INOUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:108
#define CL_OUT
CL_OUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:110
ClInt64T ClOffsetT
Offset of a buffer or object within another
Definition: clCommon.h:159
ClUint64T ClSizeT
Definition: clCommon.h:157
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
ClUint32T ClIocPortT
The IOC communication port.
Definition: clIocApi.h:348
ClUint32T ClIocNodeAddressT
The IOC node address.
Definition: clIocApi.h:343
A name.
Definition: clCommon.h:197
Version Information for various services.
Definition: clCommon.h:250
This structure represents a section identifier.
Definition: clCkptApi.h:201
This structure represents an IO vector which will be used for dealing with more than zero sections.
Definition: clCkptApi.h:309

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