Class JCoConnectionMonitorProvider
java.lang.Object
de.hybris.platform.sap.core.jco.monitor.provider.JCoConnectionMonitorProvider
- Direct Known Subclasses:
JCoConnectionMonitorClusterProvider,JCoConnectionMonitorLocalProvider
Provider of
JCoConnectionMonitor for cluster environment.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JCoMonitorJAXBHandlerJAXB handler.protected longLong lifetime threshold in milliseconds.protected RFCDestinationServiceRFC destination service. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FilecreateSnapshotFile(String snapshotFileName, Date snapshotDate) Creates the snapshot file.protected IntegerReturns the cluster id.protected booleanisLongLifetimeJCoConnection(long currentTimestamp, long lastActivityTimestamp, long longLifetime) Calculates if the lifetime of the given JCo connection exceeds the specified threshold.voidsetClusterService(de.hybris.platform.servicelayer.cluster.ClusterService clusterService) Injection setter forClusterService.voidsetJaxbHandler(JCoMonitorJAXBHandler jaxbHandler) Injection setter forJCoMonitorJAXBHandler.voidsetLongLifetimeThresholdInSeconds(long longLifetimeThresholdInSeconds) Injection setter for long lifetime threshold.voidsetRfcDestinationService(RFCDestinationService rfcDestinationService) Injection setter forRFCDestinationService.
-
Field Details
-
rfcDestinationService
RFC destination service. -
jaxbHandler
JAXB handler. -
longLifetimeThresholdMSecs
protected long longLifetimeThresholdMSecsLong lifetime threshold in milliseconds.
-
-
Constructor Details
-
JCoConnectionMonitorProvider
public JCoConnectionMonitorProvider()
-
-
Method Details
-
setClusterService
public void setClusterService(de.hybris.platform.servicelayer.cluster.ClusterService clusterService) Injection setter forClusterService.- Parameters:
clusterService- the clusterService to set
-
setRfcDestinationService
Injection setter forRFCDestinationService.- Parameters:
rfcDestinationService-RFCDestinationService
-
setJaxbHandler
Injection setter forJCoMonitorJAXBHandler.- Parameters:
jaxbHandler- the jaxb handler to set
-
setLongLifetimeThresholdInSeconds
public void setLongLifetimeThresholdInSeconds(long longLifetimeThresholdInSeconds) Injection setter for long lifetime threshold.- Parameters:
longLifetimeThresholdInSeconds- long lifetime threshold in seconds
-
isLongLifetimeJCoConnection
protected boolean isLongLifetimeJCoConnection(long currentTimestamp, long lastActivityTimestamp, long longLifetime) Calculates if the lifetime of the given JCo connection exceeds the specified threshold. If the threshold is less than 0, it is set to 0.- Parameters:
currentTimestamp- current time stamplastActivityTimestamp- last activity time stamplongLifetime- the defined threshold- Returns:
- true if the lifetime exceeds the threshold
-
createSnapshotFile
protected File createSnapshotFile(String snapshotFileName, Date snapshotDate) throws JCoMonitorException Creates the snapshot file.- Parameters:
snapshotFileName- name of the snapshot filesnapshotDate- time stamp of snapshot- Returns:
- snapshot file
- Throws:
JCoMonitorException-JCoMonitorException
-
getClusterId
Returns the cluster id.- Returns:
- cluster id
-