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 boolean
cachedExecution()
boolean
equals(Object o)
int
getIntValue(Statistics.Label label)
String
getStringValue(Statistics.Label label)
Retrieves the relevant statisticint
hashCode()
int
indicesAdded()
int
indicesDeleted()
int
labelsAdded()
int
nodesCreated()
int
nodesDeleted()
int
propertiesSet()
int
relationshipsCreated()
int
relationshipsDeleted()
String
toString()
-
-
-
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:Statistics
Retrieves the relevant statistic- Specified by:
getStringValue
in 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:
nodesCreated
in interfaceStatistics
- Returns:
- number of nodes created after query execution
-
nodesDeleted
public int nodesDeleted()
- Specified by:
nodesDeleted
in interfaceStatistics
- Returns:
- number of nodes deleted after query execution
-
indicesAdded
public int indicesAdded()
- Specified by:
indicesAdded
in interfaceStatistics
- Returns:
- number of indices added after query execution
-
indicesDeleted
public int indicesDeleted()
- Specified by:
indicesDeleted
in interfaceStatistics
-
labelsAdded
public int labelsAdded()
- Specified by:
labelsAdded
in interfaceStatistics
- Returns:
- number of labels added after query execution
-
relationshipsDeleted
public int relationshipsDeleted()
- Specified by:
relationshipsDeleted
in interfaceStatistics
- Returns:
- number of relationship deleted after query execution
-
relationshipsCreated
public int relationshipsCreated()
- Specified by:
relationshipsCreated
in interfaceStatistics
- Returns:
- number of relationship created after query execution
-
propertiesSet
public int propertiesSet()
- Specified by:
propertiesSet
in interfaceStatistics
- Returns:
- number of properties set after query execution
-
cachedExecution
public boolean cachedExecution()
- Specified by:
cachedExecution
in interfaceStatistics
- Returns:
- The execution plan was cached on RedisGraph.
-
-