Class StatisticsImpl

  • All Implemented Interfaces:
    Statistics

    public class StatisticsImpl
    extends Object
    implements Statistics
    Query result statistics interface implementation
    • 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 interface Statistics
        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 interface Statistics
        Returns:
        number of nodes created after query execution
      • nodesDeleted

        public int nodesDeleted()
        Specified by:
        nodesDeleted in interface Statistics
        Returns:
        number of nodes deleted after query execution
      • indicesAdded

        public int indicesAdded()
        Specified by:
        indicesAdded in interface Statistics
        Returns:
        number of indices added after query execution
      • labelsAdded

        public int labelsAdded()
        Specified by:
        labelsAdded in interface Statistics
        Returns:
        number of labels added after query execution
      • relationshipsDeleted

        public int relationshipsDeleted()
        Specified by:
        relationshipsDeleted in interface Statistics
        Returns:
        number of relationship deleted after query execution
      • relationshipsCreated

        public int relationshipsCreated()
        Specified by:
        relationshipsCreated in interface Statistics
        Returns:
        number of relationship created after query execution
      • propertiesSet

        public int propertiesSet()
        Specified by:
        propertiesSet in interface Statistics
        Returns:
        number of properties set after query execution
      • cachedExecution

        public boolean cachedExecution()
        Specified by:
        cachedExecution in interface Statistics
        Returns:
        The execution plan was cached on RedisGraph.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object