Subscription
Subscription for the C++ Replication API
A Subscription contains one Publication and indicates the target where the published files are to be replicated. A subscription may belong to a Replication plan.
A Subscription contains one Publication and indicates the target where the published files are to be replicated. A subscription may belong to a Replication plan.
Class
FCREPLSubscription
Represents a group of files published and subscribed for replication. In order to set a replication, this publication must be subscribed, which forms a FCREPLSubscription
, which is assigned to a FCREPLReplPlan (replication plan).
Getters
Publication entity object |
|
DBEngine entity object |
|
Database entity object |
|
Inherited getters
Subscription identification |
|
Publication identification NoteThis is linked to |
|
Publication |
|
DBEngine identification NoteThis is linked to |
|
DBEngine |
|
Database identification NoteThis is linked to |
|
Subscription name |
|
Subscription description |
|
Return if the subscription is bidirectional |
|
replication plan identification NoteThis is linked to |
|
Redirection list |
|
Redirection list count |
|
Setters
Publication entity object |
|
DBEngine entity object |
|
Database entity object |
|
Subscription name |
|
Subscription description |
|
Redirection list |
|
Inherited setters
Subscription identification |
|
Publication identification NoteThis is linked to |
|
Publication |
|
DBEngine identification NoteThis is linked to |
|
DBEngine |
|
Database identification NoteThis is linked to |
|
Database |
|
Name |
|
Description |
|
Return if the subscription is bidirectional |
|
replication plan identification NoteThis is linked to |
|
Redirection list |
|
Retrieve all the subscription entity objects
Prototype
FCREPL_API int fcReplGetSubscriptions(pFCREPLConn replConn, int publication, int dbEngine, int subscriptionListSize, int subscriptionStart, ppFCREPLSubscription *subscriptionList, int *subscriptionCount, int *totalSubscriptions);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Publication Identification |
| DBEngine Identification |
| Subscription list count to be retrieved |
| Subscription list start record |
| Subscription entity list |
| Number of subscription entities in the list |
| Total number of subscription entities |
Return
Error code
Retrieve all the subscription entity objects for the given replication plan.
Prototype
FCREPL_API int fcReplGetSubscriptions(pFCREPLConn replConn, int replPlanID, int replSubsListSize, int replSubsStart, ppFCREPLSubscription *subsList, int *subsCount, int *totalReplSubs);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Replication plan identification |
| Replication subscription list count to be retrieved |
| Replication subscription list start record |
| Subscription entity list |
| Number of subscription entities in the list |
| Total replication subscription |
Return
Error code
FCREPL_MORE_RESULT
(in case of pending files to be read)
Retrieve the publication list by name or partially filter by name.
Prototype
FCREPL_API int fcReplGetSubscriptionsByName(pFCREPLConn replConn, int publication, int dbEngine, const char *name, bool partial, int subscriptionListSize, int subscriptionStart, ppFCREPLSubscription *subscriptionList, int *subscriptionCount, int *totalSubscriptions);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Publication ID |
| DBEngine ID |
| Publication name |
| Flag indicating that the search by name should use a partial name |
| Subscription list count to be retrieved |
| Subscription list start record |
| Subscription entity list |
| Number of subscription entities in the list |
| Total number of subscription entities |
Return
Error code
Retrieve the subscription entity object by its ID.
Prototype
FCREPL_API int fcReplGetSubscription(pFCREPLConn replConn, int subscriptionID, ppFCREPLSubscription subscription);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Subscription identification |
| Subscription entity retrieved |
Return
Error code
Add a subscription entity to the database. If there already is a subscription with the given ID, update the existing record.
Prototype
FCREPL_API int fcReplPersistSubscription(pFCREPLConn replConn, pFCREPLSubscription subscription);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Subscription entity to be persisted |
Return
Error code
Delete the subscription by its ID.
Prototype
FCREPL_API int fcReplRemoveSubscription(pFCREPLConn replConn, int subscriptionID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Subscription identification |
Return
Error code
Build a list of target files for the given publication and subscription root path setup in a preview mode.
Prototype
FCREPL_API int fcReplSubsFilesPreview(pFCREPLConn replConn, int publicationID, int rootVolumeID, const char *rootPath, int dbEngineID, int fileListSize, int fileStart, int *calcRootVolume, char **calcRootPath, ppFCREPLFile *fileList, int *fileCount, int *totalFiles);
Parameters
Parameter | Description |
---|---|
| Publication identification |
| Publication identification |
| Subscription root volume identification |
| Subscription root path |
| Subscription DBEngine |
| File list count to be retrieved |
| File list start record |
| Subscription's calculated root volume |
| Subscription's calculated root path |
| File entity list |
| Number of file entities in the list |
| Total file |
Return
Error code
Retrieve the next available default name for a subscription.
Prototype
FCREPL_API int fcReplGetTempSubsName(pFCREPLConn replConn, char *tempSubsName);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Temporary subscription name |
Return
Error code