public class GridTcpDiscoverySharedFsMetricsStore extends GridTcpDiscoveryMetricsStoreAdapter
setPath(String)).GridTcpDiscoveryMetricsStoreAdapter.setMetricsExpireTime(int)).
If getPath() is not provided, then DFLT_PATH will be used and
only local nodes will discover each other. To enable metrics store working over
network you must provide a path to a shared directory explicitly.
The directory will contain files with serialized metrics named like the following 94816A59-EB51-44EE-BB67-8B24B9C10A09.
| Modifier and Type | Field and Description |
|---|---|
static String |
DFLT_PATH
Default path for local testing only.
|
DFLT_METRICS_EXPIRE_TIME| Constructor and Description |
|---|
GridTcpDiscoverySharedFsMetricsStore() |
| Modifier and Type | Method and Description |
|---|---|
Collection<UUID> |
allNodeIds()
Gets all node IDs currently contained in the store.
|
String |
getPath()
Gets path.
|
protected Map<UUID,GridNodeMetrics> |
metrics0(Collection<UUID> nodeIds)
Requests metrics from store in case local cached metrics are outdated.
|
void |
removeMetrics0(Collection<UUID> nodeIds)
Removes metrics from store.
|
void |
setPath(String path)
Sets path.
|
String |
toString() |
void |
updateLocalMetrics(UUID locNodeId,
GridNodeMetrics metrics)
Updates local node metrics in the store.
|
getMetricsExpireTime, metrics, onSpiContextDestroyed, onSpiContextInitialized, removeMetrics, setMetricsExpireTime, spiContextpublic static final String DFLT_PATH
public GridTcpDiscoverySharedFsMetricsStore()
public String getPath()
@GridSpiConfiguration(optional=true) public void setPath(String path)
path - Shared path.public void updateLocalMetrics(UUID locNodeId, GridNodeMetrics metrics) throws GridSpiException
locNodeId - Id of the local node (caller node).metrics - Local node metrics.GridSpiException - If an error occurs.protected Map<UUID,GridNodeMetrics> metrics0(Collection<UUID> nodeIds) throws GridSpiException
metrics0 in class GridTcpDiscoveryMetricsStoreAdapternodeIds - Nodes to request metrics for.GridSpiException - If any error occurs.public Collection<UUID> allNodeIds() throws GridSpiException
GridSpiException - if an error occurs.public void removeMetrics0(Collection<UUID> nodeIds) throws GridSpiException
removeMetrics0 in class GridTcpDiscoveryMetricsStoreAdapternodeIds - Nodes to remove metrics of.GridSpiException - If any error occurs.Copyright © 2014. All rights reserved.