public class LocalMapStatsProvider extends Object
createLocalMapStats(java.lang.String)
and also holds all LocalMapStatsImpl
implementations of all maps.Modifier and Type | Class and Description |
---|---|
protected static class |
LocalMapStatsProvider.LocalMapOnDemandCalculatedStats |
Modifier and Type | Field and Description |
---|---|
protected ClusterService |
clusterService |
protected ConstructorFunction<String,LocalMapStatsImpl> |
constructorFunction |
protected ILogger |
logger |
protected MapServiceContext |
mapServiceContext |
protected NearCacheProvider |
nearCacheProvider |
protected InternalPartitionService |
partitionService |
protected static int |
RETRY_COUNT |
protected ConcurrentMap<String,LocalMapStatsImpl> |
statsMap |
protected static int |
WAIT_PARTITION_TABLE_UPDATE_MILLIS |
Constructor and Description |
---|
LocalMapStatsProvider(MapServiceContext mapServiceContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
addNearCacheStats(LocalMapStatsImpl stats,
LocalMapStatsProvider.LocalMapOnDemandCalculatedStats onDemandStats,
MapContainer mapContainer)
Adds near cache stats.
|
protected void |
addOwnerPartitionStats(LocalMapStatsImpl stats,
LocalMapStatsProvider.LocalMapOnDemandCalculatedStats onDemandStats,
String mapName,
int partitionId)
Calculates and adds owner partition stats.
|
protected void |
addReplicaPartitionStats(LocalMapStatsProvider.LocalMapOnDemandCalculatedStats onDemandStats,
String mapName,
int partitionId,
InternalPartition partition,
InternalPartitionService partitionService,
int backupCount,
Address thisAddress)
Calculates and adds replica partition stats.
|
LocalMapStatsImpl |
createLocalMapStats(String mapName) |
void |
destroyLocalMapStatsImpl(String name) |
protected long |
getHits(Record record) |
LocalMapStatsImpl |
getLocalMapStatsImpl(String name) |
protected RecordStore |
getRecordStoreOrNull(String mapName,
int partitionId) |
protected Address |
getReplicaAddress(int replica,
InternalPartition partition,
InternalPartitionService partitionService,
int backupCount)
Gets replica address.
|
protected boolean |
hasRecords(RecordStore recordStore) |
protected int |
isLocked(Data key,
RecordStore recordStore)
Return 1 if locked, otherwise 0.
|
protected boolean |
isReplicaAvailable(Address replicaAddress,
InternalPartitionService partitionService,
int backupCount) |
protected boolean |
isReplicaOnThisNode(Address replicaAddress,
Address thisAddress) |
protected void |
printWarning(InternalPartition partition,
int replica) |
protected void |
sleep() |
protected Address |
waitForReplicaAddress(int replica,
InternalPartition partition,
InternalPartitionService partitionService,
int backupCount)
Waits partition table update to get replica address if current replica address is null.
|
protected static final int WAIT_PARTITION_TABLE_UPDATE_MILLIS
protected static final int RETRY_COUNT
protected final ConcurrentMap<String,LocalMapStatsImpl> statsMap
protected final ConstructorFunction<String,LocalMapStatsImpl> constructorFunction
protected final MapServiceContext mapServiceContext
protected final NearCacheProvider nearCacheProvider
protected final ClusterService clusterService
protected final InternalPartitionService partitionService
protected final ILogger logger
public LocalMapStatsProvider(MapServiceContext mapServiceContext)
public LocalMapStatsImpl getLocalMapStatsImpl(String name)
public void destroyLocalMapStatsImpl(String name)
public LocalMapStatsImpl createLocalMapStats(String mapName)
protected void addOwnerPartitionStats(LocalMapStatsImpl stats, LocalMapStatsProvider.LocalMapOnDemandCalculatedStats onDemandStats, String mapName, int partitionId)
protected long getHits(Record record)
protected int isLocked(Data key, RecordStore recordStore)
LocalMapStatsImpl.lockedEntryCount
.protected void addReplicaPartitionStats(LocalMapStatsProvider.LocalMapOnDemandCalculatedStats onDemandStats, String mapName, int partitionId, InternalPartition partition, InternalPartitionService partitionService, int backupCount, Address thisAddress)
protected boolean hasRecords(RecordStore recordStore)
protected boolean isReplicaAvailable(Address replicaAddress, InternalPartitionService partitionService, int backupCount)
protected boolean isReplicaOnThisNode(Address replicaAddress, Address thisAddress)
protected void printWarning(InternalPartition partition, int replica)
protected RecordStore getRecordStoreOrNull(String mapName, int partitionId)
protected Address getReplicaAddress(int replica, InternalPartition partition, InternalPartitionService partitionService, int backupCount)
protected Address waitForReplicaAddress(int replica, InternalPartition partition, InternalPartitionService partitionService, int backupCount)
protected void sleep()
protected void addNearCacheStats(LocalMapStatsImpl stats, LocalMapStatsProvider.LocalMapOnDemandCalculatedStats onDemandStats, MapContainer mapContainer)
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.