Class JCoConnectionMonitorClusterProvider
java.lang.Object
de.hybris.platform.sap.core.jco.monitor.provider.JCoConnectionMonitorProvider
de.hybris.platform.sap.core.jco.monitor.provider.JCoConnectionMonitorClusterProvider
Provider of
JCoConnectionMonitorProvider for node environment.-
Field Summary
Fields inherited from class de.hybris.platform.sap.core.jco.monitor.provider.JCoConnectionMonitorProvider
jaxbHandler, longLifetimeThresholdMSecs, rfcDestinationService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateSnapshotCache(Map<Integer, String> snapshotsPerNode, long cacheTimestamp) Creates the snapshot data which is buffered.createSnapshotFile(Map<Integer, String> snapshotsPerNode, long snapshotTimestamp) Create JCo connections snapshot file operation.Returns the time stamp.protected Map<String,List<JcoConnectionType>> Returns all JCo connections per RFC destination.Returns the cached result for number of JCo connections whose lifetime exceed a specific threshold parameter.Returns the total number of nodes of the result.Returns the total number of nodes which returned no result.Returns the cached result for number of RFC destinations whose pool size is reached.getSnapshotXML(Map<Integer, String> snapshotsPerNode, long snapshotTimestamp) Returns all current JCo connections as XML String.Returns cached result of total number of JCo connections.voidinitializeCache(Map<Integer, String> snapshotsPerNode, long snapshotTimestamp) Initializes the snapshot cache.voidreset()Resets the snapshot content.protected voidsafeClose(OutputStream resource) booleanChecks if snapshot content is available.Methods inherited from class de.hybris.platform.sap.core.jco.monitor.provider.JCoConnectionMonitorProvider
createSnapshotFile, getClusterId, isLongLifetimeJCoConnection, setClusterService, setJaxbHandler, setLongLifetimeThresholdInSeconds, setRfcDestinationService
-
Constructor Details
-
JCoConnectionMonitorClusterProvider
public JCoConnectionMonitorClusterProvider()
-
-
Method Details
-
initializeCache
public void initializeCache(Map<Integer, String> snapshotsPerNode, long snapshotTimestamp) throws JCoMonitorExceptionInitializes the snapshot cache.- Parameters:
snapshotsPerNode- snapshot as XML string per node idsnapshotTimestamp- snapshot time stamp- Throws:
JCoMonitorException-JCoMonitorException
-
reset
public void reset()Resets the snapshot content. -
snapshotAvailable
public boolean snapshotAvailable()Checks if snapshot content is available.- Returns:
- true, if available
-
getCacheTimestamp
Returns the time stamp.- Returns:
- time stamp as long
-
getNodesCount
Returns the total number of nodes of the result.- Returns:
- number of nodes
-
getNodesWithoutResultCount
Returns the total number of nodes which returned no result.- Returns:
- number of nodes without result
-
getTotalCount
Returns cached result of total number of JCo connections.- Returns:
- number of JCo connections
-
getLongRunnerCount
Returns the cached result for number of JCo connections whose lifetime exceed a specific threshold parameter.- Returns:
- number of JCo connections whose lifetime exceed the defined threshold
-
getPoolLimitReachedCount
Returns the cached result for number of RFC destinations whose pool size is reached.- Returns:
- number of RFC destinations whose pool size is reached
-
getSnapshotXML
public String getSnapshotXML(Map<Integer, String> snapshotsPerNode, long snapshotTimestamp) throws JCoMonitorExceptionReturns all current JCo connections as XML String.- Parameters:
snapshotsPerNode- snapshot as XML string per node idsnapshotTimestamp- snapshot time stamp- Returns:
- snapshot XML as string
- Throws:
JCoMonitorException-JCoMonitorException
-
createSnapshotFile
public File createSnapshotFile(Map<Integer, String> snapshotsPerNode, long snapshotTimestamp) throws JCoMonitorExceptionCreate JCo connections snapshot file operation.- Parameters:
snapshotsPerNode- snapshot as XML string per node idsnapshotTimestamp- snapshot time stamp- Returns:
- result message
- Throws:
JCoMonitorException-JCoMonitorException
-
createSnapshotCache
protected void createSnapshotCache(Map<Integer, String> snapshotsPerNode, long cacheTimestamp) throws JCoMonitorExceptionCreates the snapshot data which is buffered.- Parameters:
snapshotsPerNode- snapshot as XML string per node idcacheTimestamp- cache time stamp- Throws:
JCoMonitorException-JCoMonitorException
-
getJCoConnectionByRFCDestinationMap
Returns all JCo connections per RFC destination.- Parameters:
nodes- JAXB content- Returns:
- RFC destination / JCo Connections map
-
safeClose
-