public class LocalIndexStatsImpl extends Object implements LocalIndexStats
STAT_NOT_AVAILABLE
Constructor and Description |
---|
LocalIndexStatsImpl() |
Modifier and Type | Method and Description |
---|---|
void |
fromJson(JsonObject json)
Extracts the state from the given
json object and mutates the
state of this object. |
long |
getAverageHitLatency()
Returns the average hit latency (in nanoseconds) for the index.
|
double |
getAverageHitSelectivity()
Returns the average selectivity of the hits served by the index.
|
long |
getCreationTime()
Returns the creation time of this distributed object instance on this member.
|
long |
getHitCount()
Returns the total number of hits into the index.
|
long |
getInsertCount()
Returns the number of insert operations performed on the index.
|
long |
getMemoryCost()
Returns the memory cost of the index in bytes.
|
long |
getQueryCount()
Returns the total number of queries served by the index.
|
long |
getRemoveCount()
Returns the number of remove operations performed on the index.
|
long |
getTotalInsertLatency()
Returns the total latency (in nanoseconds) of insert operations performed
on the index.
|
long |
getTotalRemoveLatency()
Returns the total latency (in nanoseconds) of remove operations performed
on the index.
|
long |
getTotalUpdateLatency()
Returns the total latency (in nanoseconds) of update operations performed
on the index.
|
long |
getUpdateCount()
Returns the number of update operations performed on the index.
|
void |
setAllFrom(OnDemandIndexStats onDemandStats)
Sets all the values in this stats to the corresponding values in the
given on-demand stats.
|
void |
setAverageHitLatency(long averageHitLatency)
Sets the average hit latency of this stats to the given average hit
latency.
|
void |
setAverageHitSelectivity(double averageHitSelectivity)
Sets the average hit selectivity of this stats to the given average hit
selectivity.
|
void |
setCreationTime(long creationTime)
Sets the creation of this stats to the given creation time.
|
void |
setHitCount(long hitCount)
Sets the hit count of this stats to the given hit count.
|
void |
setInsertCount(long insertCount)
Sets the insert count of this stats to the given insert count.
|
void |
setMemoryCost(long memoryCost)
Sets the memory cost of this stats to the given memory cost value.
|
void |
setQueryCount(long queryCount)
Sets the query count of this stats to the given query count.
|
void |
setRemoveCount(long removeCount)
Sets the remove count of this stats to the given remove count.
|
void |
setTotalInsertLatency(long totalInsertLatency)
Sets the total insert latency of this stats to the given total insert
latency.
|
void |
setTotalRemoveLatency(long totalRemoveLatency)
Sets the total remove latency of this stats to the given total remove
latency.
|
void |
setTotalUpdateLatency(long totalUpdateLatency)
Sets the total update latency of this stats to the given total update
latency.
|
void |
setUpdateCount(long updateCount)
Sets the update count of this stats to the given update count.
|
JsonObject |
toJson()
Serializes state represented by this object into a
JsonObject . |
String |
toString() |
public long getCreationTime()
LocalInstanceStats
getCreationTime
in interface LocalInstanceStats
public void setCreationTime(long creationTime)
creationTime
- the creation time to set.public long getQueryCount()
LocalIndexStats
To calculate the index hit rate just divide the returned value by a value
returned by LocalMapStats.getQueryCount()
.
The returned value may be less than the one returned by LocalIndexStats.getHitCount()
since a single query may hit the same index more than once.
getQueryCount
in interface LocalIndexStats
public void setQueryCount(long queryCount)
queryCount
- the query count to set.public long getHitCount()
LocalIndexStats
The returned value may be greater than the one returned by LocalIndexStats.getQueryCount()
since a single query may hit the same index more than once.
getHitCount
in interface LocalIndexStats
public void setHitCount(long hitCount)
hitCount
- the hit count to set.public long getAverageHitLatency()
LocalIndexStats
getAverageHitLatency
in interface LocalIndexStats
public void setAverageHitLatency(long averageHitLatency)
averageHitLatency
- the average hit latency to set.public double getAverageHitSelectivity()
LocalIndexStats
The returned value is in the range from 0.0 to 1.0. Values close to 1.0 indicate a high selectivity meaning the index is efficient; values close to 0.0 indicate a low selectivity meaning the index efficiency is approaching an efficiency of a simple full scan.
getAverageHitSelectivity
in interface LocalIndexStats
public void setAverageHitSelectivity(double averageHitSelectivity)
averageHitSelectivity
- the average hit selectivity to set.public long getInsertCount()
LocalIndexStats
getInsertCount
in interface LocalIndexStats
public void setInsertCount(long insertCount)
insertCount
- the insert count to set.public long getTotalInsertLatency()
LocalIndexStats
To compute the average latency divide the returned value by insert operation count
.
getTotalInsertLatency
in interface LocalIndexStats
public void setTotalInsertLatency(long totalInsertLatency)
totalInsertLatency
- the total insert latency to set.public long getUpdateCount()
LocalIndexStats
getUpdateCount
in interface LocalIndexStats
public void setUpdateCount(long updateCount)
updateCount
- the update count to set.public long getTotalUpdateLatency()
LocalIndexStats
To compute the average latency divide the returned value by update operation count
.
getTotalUpdateLatency
in interface LocalIndexStats
public void setTotalUpdateLatency(long totalUpdateLatency)
totalUpdateLatency
- the total update latency to set.public long getRemoveCount()
LocalIndexStats
getRemoveCount
in interface LocalIndexStats
public void setRemoveCount(long removeCount)
removeCount
- the remove count to set.public long getTotalRemoveLatency()
LocalIndexStats
To compute the average latency divide the returned value by remove operation count
.
getTotalRemoveLatency
in interface LocalIndexStats
public void setTotalRemoveLatency(long totalRemoveLatency)
totalRemoveLatency
- the total remove latency to set.public long getMemoryCost()
LocalIndexStats
Currently, for on-heap indexes (OBJECT and BINARY storages), the returned value is just a best-effort approximation and doesn't indicate a precise on-heap memory usage of the index.
getMemoryCost
in interface LocalIndexStats
public void setMemoryCost(long memoryCost)
memoryCost
- the memory cost value to set.public void setAllFrom(OnDemandIndexStats onDemandStats)
onDemandStats
- the on-demand stats to fetch the values to set from.public JsonObject toJson()
JsonSerializable
JsonObject
.toJson
in interface JsonSerializable
public void fromJson(JsonObject json)
JsonSerializable
json
object and mutates the
state of this object.fromJson
in interface JsonSerializable
json
- the JSON object carrying state for this objectCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.