Class NodeManagementService
java.lang.Object
org.jumpmind.symmetric.service.jmx.NodeManagementService
- All Implemented Interfaces:
IBuiltInExtensionPoint
,IExtensionPoint
,ISymmetricEngineAware
@ManagedResource(description="The management interface for a node")
public class NodeManagementService
extends Object
implements IBuiltInExtensionPoint, ISymmetricEngineAware
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNodeToWhiteList
(String nodeId) boolean
areAllLoadBatchesComplete
(String nodeId) long
cleanStaging
(long timeToLiveInMS) void
void
encryptText
(String plainText) boolean
extractBatcheRange
(String fileName, String nodeId, String startTime, String endTime, String channelIdList) int
int
int
int
int
int
long
void
ignoreNodeChannelForExternalId
(boolean ignore, String channelId, String nodeGroupId, String externalId) boolean
boolean
isExternalIdRegistered
(String nodeGroupdId, String externalId) boolean
void
openRegistration
(String nodeGroupId, String externalId) void
purge()
reloadNode
(String nodeId) reloadTable
(String nodeId, String catalogName, String schemaName, String tableName) reloadTable
(String nodeId, String catalogName, String schemaName, String tableName, String overrideInitialLoadSelect) void
removeNodeFromWhiteList
(String nodeId) void
reopenRegistration
(String nodeId) void
setConcurrentWorkersMax
(int value) void
setSymmetricEngine
(ISymmetricEngine engine) boolean
setSyncEnabledForNode
(String nodeId, boolean syncEnabled) snapshot()
boolean
start()
void
stop()
void
void
writeBatchRangeToFile
(String nodeId, String startBatchId, String endBatchId, String fileName)
-
Field Details
-
engine
-
-
Constructor Details
-
NodeManagementService
public NodeManagementService()
-
-
Method Details
-
setSymmetricEngine
- Specified by:
setSymmetricEngine
in interfaceISymmetricEngineAware
-
isStarted
@ManagedAttribute(description="Checks if SymmetricDS has been started.") public boolean isStarted() -
start
@ManagedOperation(description="Start the SymmetricDS engine") public boolean start() -
stop
@ManagedOperation(description="Stop the SymmetricDS engine") public void stop() -
purge
@ManagedOperation(description="Run the outgoing purge process") public void purge() -
snapshot
@ManagedOperation(description="Create a snapshot of the current state of the system") public String snapshot() -
clearCaches
@ManagedOperation(description="Force the cached objects to be reread from the database the next time they are accessed") public void clearCaches() -
syncTriggers
@ManagedOperation(description="Synchronize the triggers") public void syncTriggers() -
getConcurrentWorkersMax
@ManagedAttribute(description="Get the number of current connections allowed to this instance of the node via HTTP. If this value is 20, then 20 concurrent push clients and 20 concurrent pull clients will be allowed") public int getConcurrentWorkersMax() -
getConcurrentWorkersActive
@ManagedAttribute(description="Get the number of active connections to this node via HTTP") public int getConcurrentWorkersActive() -
showNodeConcurrencyStatisticsAsText
@ManagedOperation(description="Get connection statistics about indivdual nodes") public String showNodeConcurrencyStatisticsAsText() -
cleanStaging
@ManagedOperation(description="Clean up both incoming and outgoing resources that are older than the passed in number of milliseconds") @ManagedOperationParameters(@ManagedOperationParameter(name="timeToLiveInMS",description="The number of milliseconds old a resource should be before it is cleaned up")) public long cleanStaging(long timeToLiveInMS) -
getNodesInWhiteList
@ManagedAttribute(description="Get a list of nodes that have been added to the white list, a list of node ids that always get through the concurrency manager.") public String getNodesInWhiteList() -
addNodeToWhiteList
@ManagedOperation(description="Add a node id to the list of nodes that will always get through the concurrency manager") @ManagedOperationParameters(@ManagedOperationParameter(name="nodeId",description="The node id to add to the white list")) public void addNodeToWhiteList(String nodeId) -
removeNodeFromWhiteList
@ManagedOperation(description="Remove a node id to the list of nodes that will always get through the concurrency manager") @ManagedOperationParameters(@ManagedOperationParameter(name="nodeId",description="The node id to remove from the white list")) public void removeNodeFromWhiteList(String nodeId) -
setConcurrentWorkersMax
@ManagedAttribute(description="Configure the number of connections allowed to this node. If the value is set to zero you are effectively disabling your transport (wihch can be useful for maintainance") public void setConcurrentWorkersMax(int value) -
getNodeGroupId
-
getExternalId
@ManagedAttribute(description="An external name given to this SymmetricDS node") public String getExternalId() -
getNodeId
@ManagedAttribute(description="The node id given to this SymmetricDS node") public String getNodeId() -
isBasicDataSource
@ManagedAttribute(description="Whether the basic DataSource is being used as the default datasource.") public boolean isBasicDataSource() -
getDatabaseConnectionsActive
@ManagedAttribute(description="If a BasicDataSource, then show the number of active connections") public int getDatabaseConnectionsActive() -
getDatabaseConnectionsMax
@ManagedAttribute(description="If a BasicDataSource, then show the max number of total connections") public int getDatabaseConnectionsMax() -
isExternalIdRegistered
@ManagedOperation(description="Check to see if the external id is registered") @ManagedOperationParameter(name="nodeGroupId",description="The node group id for a node") @ManagedOperationParameter(name="externalId",description="The external id for a node") public boolean isExternalIdRegistered(String nodeGroupdId, String externalId) -
clearAllLocks
@ManagedOperation(description="Emergency remove all locks (if left abandoned on a cluster)") public void clearAllLocks() -
areAllLoadBatchesComplete
@ManagedOperation(description="Check to see if the initial load for a node id is complete. This method will throw an exception if the load error\'d out or was never started.") @ManagedOperationParameters(@ManagedOperationParameter(name="nodeId",description="The node id")) public boolean areAllLoadBatchesComplete(String nodeId) -
setSyncEnabledForNode
@ManagedOperation(description="Enable or disable synchronization completely for a node") @ManagedOperationParameter(name="nodeId",description="The node to enable or disable") @ManagedOperationParameter(name="syncEnabled",description="true is enabled, false is disabled") public boolean setSyncEnabledForNode(String nodeId, boolean syncEnabled) -
extractBatcheRange
@ManagedOperation(description="Extract multiple batches to a file for a time range") @ManagedOperationParameter(name="fileName",description="The file to write the batch output to") @ManagedOperationParameter(name="nodeId",description="The target node id whose batches need extracted") @ManagedOperationParameter(name="startTime",description="The start time range to extract. The format is yyyy-MM-dd hh:mm") @ManagedOperationParameter(name="endTime",description="The start time range to extract. The format is yyyy-MM-dd hh:mm") @ManagedOperationParameter(name="channelIdList",description="A comma separated list of channels to extract") public boolean extractBatcheRange(String fileName, String nodeId, String startTime, String endTime, String channelIdList) -
ignoreNodeChannelForExternalId
@ManagedOperation(description="Enable or disable a channel for a specific external id") @ManagedOperationParameter(name="ignore",description="Set to true to enable and false to disable") @ManagedOperationParameter(name="channelId",description="The channel id to enable or disable") @ManagedOperationParameter(name="nodeGroupId",description="The node group id for a node") @ManagedOperationParameter(name="externalId",description="The external id for a node") public void ignoreNodeChannelForExternalId(boolean ignore, String channelId, String nodeGroupId, String externalId) -
openRegistration
@ManagedOperation(description="Open the registration for a node with the specified external id") @ManagedOperationParameter(name="nodeGroup",description="The node group id this node will belong to") @ManagedOperationParameter(name="externalId",description="The external id for the node") public void openRegistration(String nodeGroupId, String externalId) -
reopenRegistration
@ManagedOperation(description="Re-open the registration for a node with the specified external id") @ManagedOperationParameters(@ManagedOperationParameter(name="nodeId",description="The node id to reopen registration for")) public void reopenRegistration(String nodeId) -
reloadNode
-
sendSQL
@ManagedOperation(description="Send a SQL event to a node.") @ManagedOperationParameter(name="nodeId",description="The node id to sent the event to.") @ManagedOperationParameter(name="catalogName",description="The catalog name to reload. Can be null.") @ManagedOperationParameter(name="schemaName",description="The schema name to reload. Can be null.") @ManagedOperationParameter(name="tableName",description="The table name the SQL is for.") @ManagedOperationParameter(name="sql",description="The SQL statement to send.") public String sendSQL(String nodeId, String catalogName, String schemaName, String tableName, String sql) -
reloadTable
@ManagedOperation(description="Send a delete and reload of a table to a node.") @ManagedOperationParameter(name="nodeId",description="The node id to reload.") @ManagedOperationParameter(name="catalogName",description="The catalog name to reload. Can be null.") @ManagedOperationParameter(name="schemaName",description="The schema name to reload. Can be null.") @ManagedOperationParameter(name="tableName",description="The table name to reload.") public String reloadTable(String nodeId, String catalogName, String schemaName, String tableName) -
reloadTable
@ManagedOperation(description="Send a delete and reload of a table to a node.") @ManagedOperationParameter(name="nodeId",description="The node id to reload.") @ManagedOperationParameter(name="catalogName",description="The catalog name to reload. Can be null.") @ManagedOperationParameter(name="schemaName",description="The schema name to reload. Can be null.") @ManagedOperationParameter(name="tableName",description="The table name to reload.") @ManagedOperationParameter(name="overrideInitialLoadSelect",description="Override initial load select where-clause.") public String reloadTable(String nodeId, String catalogName, String schemaName, String tableName, String overrideInitialLoadSelect) -
writeBatchRangeToFile
@ManagedOperation(description="Write a range of batches to a file in SymmetricDS Data Format.") @ManagedOperationParameter(name="nodeId",description="The node id for the batches which will be written") @ManagedOperationParameter(name="startBatchId",description="Starting batch ID of range") @ManagedOperationParameter(name="endBatchId",description="Ending batch ID of range") @ManagedOperationParameter(name="fileName",description="File name to write batches") public void writeBatchRangeToFile(String nodeId, String startBatchId, String endBatchId, String fileName) throws Exception - Throws:
Exception
-
encryptText
@ManagedOperation(description="Encrypts plain text for use with db.user and db.password properties") @ManagedOperationParameters(@ManagedOperationParameter(name="plainText",description="Plain text to encrypt")) public String encryptText(String plainText) throws Exception - Throws:
Exception
-
getBatchesInError
@ManagedAttribute(description="Number of batches in error") public int getBatchesInError() -
getBatchesUnsent
@ManagedAttribute(description="Number of batches unsent") public int getBatchesUnsent() -
getDataUnrouted
@ManagedAttribute(description="Number of data unrouted") public long getDataUnrouted() -
getStartedTime
-
getVersion
-