Agent
Agents for the C++ Replication API
Each machine in the Site must have at least one Replication Agent running to be included in the site.
Each machine in the Site must have at least one Replication Agent running to be included in the site.
Class
FCREPLAgent
The Replication Manager has a distributed management so it requires at least one Replication Manager agent per machine. This class manages this agent information.
Note
Do not manually create/change any of these objects since it is managed internally. You can look at the values of these objects but do not change them.
Getters
Current agent status |
|
Inherited getters
Agent identification |
|
OpSystem identification that is running the agent NoteThis is linked to |
|
DBEngine identification that has the agent embedded with. NoteThis is linked to |
|
Status |
|
Agent status string |
|
Last time that the agent status changed |
|
Agent's working volume identification NoteThis is linked to |
|
Agent's working volume name |
|
Agent's working directory |
|
Agent consumer list |
|
Agent customer count |
|
Setters
Current agent status |
|
Agent's working volume name |
|
Agent's working directory |
|
Inherited setters
Agent identification |
|
OpSystem identification that is running the agent NoteThis is linked to |
|
DBEngine identification that has the agent embedded with NoteIt is linked to |
|
Status |
|
Last time that the agent status changed |
|
Agent's working volume identification NoteThis is linked to |
|
Working volume name |
|
Working directory |
|
Agent consumer list |
|
Retrieve all the agent entity objects for the given opSystem identification.
Prototype
FCREPL_API int fcReplGetAgents(pFCREPLConn replConn, int osID, ppFCREPLAgent *agentList, int *agentCount);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| OS identification or -1 for all agents |
| Agent entity list |
| Number of agent entities in the list |
Return
Error code
Retrieve the agent entity object by its DBEngine identification.
Prototype
FCREPL_API int fcReplGetAgentByDBEngine(pFCREPLConn replConn, int dbEngineID, ppFCREPLAgent agent);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Embedded DBEngine identification |
| Agent entity retrieved |
Return
Error code
Retrieve the agent entity object by working path.
Prototype
FCREPL_API int fcReplGetAgentByPath(pFCREPLConn replConn, int workingVolumeID, const char *workingDir, ppFCREPLAgent agent);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Working volume identification |
| Working directory |
| Agent entity retrieved |
Return
Error code
Add an agent entity into the database. If there already is an agent with the given working path, update the existing record.
Prototype
FCREPL_API int fcReplPersistAgent(pFCREPLConn replConn, pFCREPLAgent agent);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Agent entity to be persisted |
Return
Error code
Delete the agent by its ID.
Prototype
FCREPL_API int fcReplRemoveAgent(pFCREPLConn replConn, int agentID, bool recursive);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Agent identification |
| Recursive flag |
Return
Error code
Push a heartbeat action to check if the agent is running or not and update its status. After validating it, returns its status.
Prototype
FCREPL_API int fcReplCheckAgentStatus(pFCREPLConn replConn, int agentID, ppFCREPLAgent *agentList, int *agentCount);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Agent identification or -1 if it is for all the agents |
| Agent entity list retrieved or NULL in case it doesn't want to retrieve it |
| Agent entity list count |
Return
Error code
Update the current status for the given agent.
Prototype
FCREPL_API int fcReplSetAgentStatus(pFCREPLConn replConn, int agentID, FCREPLAgentStatus status);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Agent identification |
| New status |
Return
Error code