Class StatisticsImpl
- java.lang.Object
-
- com.redislabs.redisgraph.impl.resultset.StatisticsImpl
-
- All Implemented Interfaces:
Statistics
public class StatisticsImpl extends Object implements Statistics
Query result statistics interface implementation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.redislabs.redisgraph.Statistics
Statistics.Label
-
-
Constructor Summary
Constructors Constructor Description StatisticsImpl(List<byte[]> raw)A raw representation of query execution statistics is a list of strings (byte arrays which need to be de-serialized).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancachedExecution()booleanequals(Object o)intgetIntValue(Statistics.Label label)StringgetStringValue(Statistics.Label label)Retrieves the relevant statisticinthashCode()intindicesAdded()intindicesDeleted()intlabelsAdded()intnodesCreated()intnodesDeleted()intpropertiesSet()intrelationshipsCreated()intrelationshipsDeleted()StringtoString()
-
-
-
Constructor Detail
-
StatisticsImpl
public StatisticsImpl(List<byte[]> raw)
A raw representation of query execution statistics is a list of strings (byte arrays which need to be de-serialized). Each string is built in the form of "K:V" where K is statistics label and V is its value.- Parameters:
raw- a raw representation of the query execution statistics
-
-
Method Detail
-
getStringValue
public String getStringValue(Statistics.Label label)
Description copied from interface:StatisticsRetrieves the relevant statistic- Specified by:
getStringValuein interfaceStatistics- Parameters:
label- the requested statistic label as key- Returns:
- a string with the value, if key exists, null otherwise
-
getIntValue
public int getIntValue(Statistics.Label label)
- Parameters:
label- the requested statistic label as key- Returns:
- a string with the value, if key exists, 0 otherwise
-
nodesCreated
public int nodesCreated()
- Specified by:
nodesCreatedin interfaceStatistics- Returns:
- number of nodes created after query execution
-
nodesDeleted
public int nodesDeleted()
- Specified by:
nodesDeletedin interfaceStatistics- Returns:
- number of nodes deleted after query execution
-
indicesAdded
public int indicesAdded()
- Specified by:
indicesAddedin interfaceStatistics- Returns:
- number of indices added after query execution
-
indicesDeleted
public int indicesDeleted()
- Specified by:
indicesDeletedin interfaceStatistics
-
labelsAdded
public int labelsAdded()
- Specified by:
labelsAddedin interfaceStatistics- Returns:
- number of labels added after query execution
-
relationshipsDeleted
public int relationshipsDeleted()
- Specified by:
relationshipsDeletedin interfaceStatistics- Returns:
- number of relationship deleted after query execution
-
relationshipsCreated
public int relationshipsCreated()
- Specified by:
relationshipsCreatedin interfaceStatistics- Returns:
- number of relationship created after query execution
-
propertiesSet
public int propertiesSet()
- Specified by:
propertiesSetin interfaceStatistics- Returns:
- number of properties set after query execution
-
cachedExecution
public boolean cachedExecution()
- Specified by:
cachedExecutionin interfaceStatistics- Returns:
- The execution plan was cached on RedisGraph.
-
-