public class GridTcpDiscoveryJdbcMetricsStore extends GridTcpDiscoveryMetricsStoreAdapter
setDataSource(DataSource)).The database will contain 1 table to hold nodes metrics (tbl_metrics).
| Modifier and Type | Field and Description |
|---|---|
static String |
CHK_QRY
Query to check database validity.
|
static String |
CREATE_METRICS_TABLE_QRY
Query to create metrics table.
|
static String |
GET_ALL_IDS_QRY
Query to get all node IDs.
|
static String |
GET_METRICS_QRY
Query to get metrics.
|
static String |
PUT_METRICS_QRY
Query to put metrics.
|
static String |
REMOVE_METRICS_QRY
Query to remove metrics.
|
DFLT_METRICS_EXPIRE_TIME| Constructor and Description |
|---|
GridTcpDiscoveryJdbcMetricsStore() |
| Modifier and Type | Method and Description |
|---|---|
Collection<UUID> |
allNodeIds()
Gets all node IDs currently contained in the store.
|
protected Map<UUID,GridNodeMetrics> |
metrics0(Collection<UUID> nodeIds)
Requests metrics from store in case local cached metrics are outdated.
|
protected void |
removeMetrics0(Collection<UUID> nodeIds)
Removes metrics from store.
|
void |
setDataSource(DataSource dataSrc)
Sets data source.
|
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 GET_METRICS_QRY
public static final String REMOVE_METRICS_QRY
public static final String GET_ALL_IDS_QRY
public static final String PUT_METRICS_QRY
public static final String CREATE_METRICS_TABLE_QRY
public static final String CHK_QRY
protected Map<UUID,GridNodeMetrics> metrics0(Collection<UUID> nodeIds) throws GridSpiException
metrics0 in class GridTcpDiscoveryMetricsStoreAdapternodeIds - Nodes to request metrics for.GridSpiException - If any error occurs.protected void removeMetrics0(Collection<UUID> nodeIds) throws GridSpiException
removeMetrics0 in class GridTcpDiscoveryMetricsStoreAdapternodeIds - Nodes to remove metrics of.GridSpiException - If any error occurs.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.public Collection<UUID> allNodeIds() throws GridSpiException
GridSpiException - if an error occurs.@GridSpiConfiguration(optional=false) public void setDataSource(DataSource dataSrc)
Data source should be fully configured and ready-to-use.
dataSrc - Data source.Copyright © 2014. All rights reserved.