Interface JsonCache

  • All Known Subinterfaces:
    JsonCache.Root

    public interface JsonCache
    An interface for querying and mutating a JSON object graph. Clients indicate the location within the graph at which a value is to be read or written using a JSON Pointer as either a string or a JsonPointer instance. The latter is more efficient for repeated access to the same location. For the set(ptr|path, value) and getXxx(ptr|path, defaultValue)methods, the cache automatically creates missing container elements in the path as either object or array nodes according to whether the corresponding path segment is a property name or an integer index respectively, and creates the leaf element as a JSON value node of the appropriate type. Existing tree elements identified by a JSON pointer must match the pointer segments by type; that is, an existing parent of an integer path segment must be an array node and existing parent of a property name path segment must be an object node: if this condition is not met, the method throws a JsonCache.CacheException. Note that it is possible to store the same object at multiple locations within the tree (thus converting the tree to a graph), in which case the same object may be retrieved using any of the corresponding paths. However, this shared object becomes multiple independent objects when serialised to JSON and if subsequently loaded into a cache instance. Such graphs must be acyclic: storing a cyclic graph in the tree will cause a stack overflow when the cache is saved. Instances are not guaranteed threadsafe and require external synchronisation if mutator methods may be called concurrently from multiple threads. Sparse arrays are not supported - all array elements have a value, even if it is null.

    N.B. some getXxx() methods can return mutable objects, mutations to which will be unobserved by the cache instance, thus compromising the reliability of the flush*() methods. Callers relying on these methods should either not mutate such objects or they should call the appropriate set() method afterwards to ensure that the cache's 'modified' flag is set.

    Since:
    4.0.0
    Author:
    Adrian Price, TIBCO Software Inc.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  JsonCache.CacheException
      Exception thrown by cache operations.
      static interface  JsonCache.Factory
      A factory for creating JSON cache root instances.
      static interface  JsonCache.Root
      Load/merge/save/flush functionality implemented by the root of a JSON cache hierarchy.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr, boolean value)
      Adds a boolean to an array.
      JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr, double value)
      Adds a double value to an array.
      JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr, float value)
      Adds a float value to an array.
      JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr, int value)
      Adds an int value to an array.
      JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr, long value)
      Adds a long value to an array.
      JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr, short value)
      Adds a short value to an array.
      JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr, Object value)
      Adds an object to an array.
      JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr, BigDecimal value)
      Adds a BigDecimal to an array.
      JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr, BigInteger value)
      Adds a BigInteger to an array.
      JsonCache add​(String path, boolean value)
      Adds a boolean value to an array.
      JsonCache add​(String path, double value)
      Adds a double value to an array.
      JsonCache add​(String path, float value)
      Adds a float value to an array.
      JsonCache add​(String path, int value)
      Adds an int value to an array.
      JsonCache add​(String path, long value)
      Adds a long value to an array.
      JsonCache add​(String path, short value)
      Adds a short value to an array.
      JsonCache add​(String path, Object value)
      Adds an object to an array.
      JsonCache add​(String path, BigDecimal value)
      Adds a BigDecimal to an array.
      JsonCache add​(String path, BigInteger value)
      Adds a BigInteger to an array.
      JsonCache child​(com.fasterxml.jackson.core.JsonPointer ptr)
      Returns a child cache rooted at the given location relative to the receiver's base pointer.
      JsonCache child​(String path)
      Returns a child cache rooted at the given location relative to the receiver's base pointer.
      void delete​(com.fasterxml.jackson.core.JsonPointer ptr)
      Deletes a property within the object graph managed by the receiver.
      void delete​(String path)
      Deletes a property within the object graph managed by the receiver.
      boolean exists​(com.fasterxml.jackson.core.JsonPointer ptr)
      Tests for the existence of the specified path within the object graph managed by the receiver.
      boolean exists​(String path)
      Tests for the existence of the specified path within the object graph managed by the receiver.
      Object get​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves an Object value from within the graph.
      Object get​(com.fasterxml.jackson.core.JsonPointer ptr, Object defaultValue)
      Retrieves an Object value from within the graph.
      Object get​(String path)
      Retrieves an Object value from within the graph.
      Object get​(String path, Object defaultValue)
      Retrieves an Object value from within the graph.
      BigDecimal getBigDecimal​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves a BigDecimal value from within the graph.
      BigDecimal getBigDecimal​(com.fasterxml.jackson.core.JsonPointer ptr, BigDecimal defaultValue)
      Retrieves a BigDecimal value from within the graph.
      BigDecimal getBigDecimal​(String path)
      Retrieves a BigDecimal value from within the graph.
      BigDecimal getBigDecimal​(String path, BigDecimal defaultValue)
      Retrieves a BigDecimal value from within the graph.
      BigInteger getBigInteger​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves a BigInteger value from within the graph.
      BigInteger getBigInteger​(com.fasterxml.jackson.core.JsonPointer ptr, BigInteger defaultValue)
      Retrieves a BigInteger value from within the graph.
      BigInteger getBigInteger​(String path)
      Retrieves a BigInteger value from within the graph.
      BigInteger getBigInteger​(String path, BigInteger defaultValue)
      Retrieves a BigInteger value from within the graph.
      byte[] getBinary​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves a byte[] value from within the graph.
      byte[] getBinary​(com.fasterxml.jackson.core.JsonPointer ptr, byte[] defaultValue)
      Retrieves a byte[] value from within the graph.
      byte[] getBinary​(String path)
      Retrieves a byte[] value from within the graph.
      byte[] getBinary​(String path, byte[] defaultValue)
      Retrieves a byte[] value from within the graph.
      boolean getBoolean​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves a boolean value from within the graph.
      boolean getBoolean​(com.fasterxml.jackson.core.JsonPointer ptr, boolean defaultValue)
      Retrieves a boolean value from within the graph.
      boolean getBoolean​(String path)
      Retrieves a boolean value from within the graph.
      boolean getBoolean​(String path, boolean defaultValue)
      Retrieves a boolean value from within the graph.
      double getDouble​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves a double value from within the graph.
      double getDouble​(com.fasterxml.jackson.core.JsonPointer ptr, double defaultValue)
      Retrieves a double value from within the graph.
      double getDouble​(String path)
      Retrieves a double value from within the graph.
      double getDouble​(String path, double defaultValue)
      Retrieves a double value from within the graph.
      float getFloat​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves a float value from within the graph.
      float getFloat​(com.fasterxml.jackson.core.JsonPointer ptr, float defaultValue)
      Retrieves a float value from within the graph.
      float getFloat​(String path)
      Retrieves a float value from within the graph.
      float getFloat​(String path, float defaultValue)
      Retrieves a float value from within the graph.
      int getInt​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves an int value from within the graph.
      int getInt​(com.fasterxml.jackson.core.JsonPointer ptr, int defaultValue)
      Retrieves an int value from within the graph.
      int getInt​(String path)
      Retrieves an int value from within the graph.
      int getInt​(String path, int defaultValue)
      Retrieves an int value from within the graph.
      long getLong​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves a long value from within the graph.
      long getLong​(com.fasterxml.jackson.core.JsonPointer ptr, long defaultValue)
      Retrieves a long value from within the graph.
      long getLong​(String path)
      Retrieves a long value from within the graph.
      long getLong​(String path, long defaultValue)
      Retrieves a long value from within the graph.
      com.fasterxml.jackson.databind.node.JsonNodeType getNodeType​(com.fasterxml.jackson.core.JsonPointer ptr)
      Returns the node type at the specified location in the object graph.
      com.fasterxml.jackson.databind.node.JsonNodeType getNodeType​(String path)
      Returns the node type at the specified location in the object graph.
      Number getNumber​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves a Number value from within the graph.
      Number getNumber​(com.fasterxml.jackson.core.JsonPointer ptr, Number defaultValue)
      Retrieves a Number value from within the graph.
      Number getNumber​(String path)
      Retrieves a Number value from within the graph.
      Number getNumber​(String path, Number defaultValue)
      Retrieves a Number value from within the graph.
      <T> T getObject​(com.fasterxml.jackson.core.JsonPointer ptr, Class<T> type)
      Retrieves a typed object value from within the graph.
      <T> T getObject​(com.fasterxml.jackson.core.JsonPointer ptr, T defaultValue)
      Retrieves a typed object value from within the graph.
      <T> T getObject​(String path, Class<T> type)
      Retrieves a typed object value from within the graph.
      <T> T getObject​(String path, T defaultValue)
      Retrieves a typed object value from within the graph.
      <T> List<T> getObjects​(com.fasterxml.jackson.core.JsonPointer ptr, Class<T> type)
      Retrieves a typed list of objects from within the graph.
      <T> List<T> getObjects​(com.fasterxml.jackson.core.JsonPointer ptr, Class<T> type, List<T> defaultValue)
      Retrieves a typed list of objects from within the graph.
      <T> List<T> getObjects​(String path, Class<T> type)
      Retrieves a typed list of objects from within the graph.
      <T> List<T> getObjects​(String path, Class<T> type, List<T> defaultValue)
      Retrieves a typed list of objects from within the graph.
      short getShort​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves a short value from within the graph.
      short getShort​(com.fasterxml.jackson.core.JsonPointer ptr, short defaultValue)
      Retrieves a short value from within the graph.
      short getShort​(String path)
      Retrieves a short value from within the graph.
      short getShort​(String path, short defaultValue)
      Retrieves a short value from within the graph.
      String getString​(com.fasterxml.jackson.core.JsonPointer ptr)
      Retrieves a String value from within the graph.
      String getString​(com.fasterxml.jackson.core.JsonPointer ptr, String defaultValue)
      Retrieves a String value from within the graph.
      String getString​(String path)
      Retrieves a String value from within the graph.
      String getString​(String path, String defaultValue)
      Retrieves a String value from within the graph.
      JsonCache parent()
      Returns the parent cache of which this is a descendant.
      JsonCache.Root root()
      Returns the root cache of which this is a descendant.
      JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr, boolean value)
      Sets a boolean property within the object graph managed by the receiver.
      JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr, double value)
      Sets a double property within the object graph managed by the receiver.
      JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr, float value)
      Sets a float property within the object graph managed by the receiver.
      JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr, int value)
      Sets an int property within the object graph managed by the receiver.
      JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr, long value)
      Sets a long property within the object graph managed by the receiver.
      JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr, short value)
      Sets a short property within the object graph managed by the receiver.
      JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr, Object value)
      Sets an Object property within the object graph managed by the receiver.
      JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr, String value)
      Sets a String property within the object graph managed by the receiver.
      JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr, BigDecimal value)
      Sets a BigDecimal property within the object graph managed by the receiver.
      JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr, BigInteger value)
      Sets a BigInteger property within the object graph managed by the receiver.
      JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr, List<?> values)
      Sets a List property within the object graph managed by the receiver.
      JsonCache set​(String path, boolean value)
      Sets a boolean property within the object graph managed by the receiver.
      JsonCache set​(String path, double value)
      Sets a double property within the object graph managed by the receiver.
      JsonCache set​(String path, float value)
      Sets a float property within the object graph managed by the receiver.
      JsonCache set​(String path, int value)
      Sets an int property within the object graph managed by the receiver.
      JsonCache set​(String path, long value)
      Sets a long property within the object graph managed by the receiver.
      JsonCache set​(String path, short value)
      Sets a short property within the object graph managed by the receiver.
      JsonCache set​(String path, Object value)
      Sets an Object property within the object graph managed by the receiver.
      JsonCache set​(String path, String value)
      Sets a String property within the object graph managed by the receiver.
      JsonCache set​(String path, BigDecimal value)
      Sets a BigDecimal property within the object graph managed by the receiver.
      JsonCache set​(String path, BigInteger value)
      Sets a BigInteger property within the object graph managed by the receiver.
      JsonCache set​(String path, List<?> values)
      Sets a List property within the object graph managed by the receiver.
      int size​(com.fasterxml.jackson.core.JsonPointer ptr)
      Returns the size of a node within the object graph managed by the receiver.
      int size​(String path)
      Returns the size of a node within the object graph managed by the receiver.
    • Method Detail

      • add

        JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr,
                      BigDecimal value)
               throws JsonCache.CacheException
        Adds a BigDecimal to an array. The array is created if it does not already exist.
        Parameters:
        ptr - A pointer to the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr,
                      BigInteger value)
               throws JsonCache.CacheException
        Adds a BigInteger to an array. The array is created if it does not already exist.
        Parameters:
        ptr - A pointer to the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr,
                      boolean value)
               throws JsonCache.CacheException
        Adds a boolean to an array. The array is created if it does not already exist.
        Parameters:
        ptr - A pointer to the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr,
                      double value)
               throws JsonCache.CacheException
        Adds a double value to an array. The array is created if it does not already exist.
        Parameters:
        ptr - A pointer to the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr,
                      float value)
               throws JsonCache.CacheException
        Adds a float value to an array. The array is created if it does not already exist.
        Parameters:
        ptr - A pointer to the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr,
                      int value)
               throws JsonCache.CacheException
        Adds an int value to an array. The array is created if it does not already exist.
        Parameters:
        ptr - A pointer to the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr,
                      long value)
               throws JsonCache.CacheException
        Adds a long value to an array. The array is created if it does not already exist.
        Parameters:
        ptr - A pointer to the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr,
                      Object value)
               throws JsonCache.CacheException
        Adds an object to an array. The array is created if it does not already exist.
        Parameters:
        ptr - A pointer to the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(com.fasterxml.jackson.core.JsonPointer ptr,
                      short value)
               throws JsonCache.CacheException
        Adds a short value to an array. The array is created if it does not already exist.
        Parameters:
        ptr - A pointer to the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(String path,
                      BigDecimal value)
               throws JsonCache.CacheException
        Adds a BigDecimal to an array. The array is created if it does not already exist.
        Parameters:
        path - A JSON Pointer expression for the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        IllegalArgumentException - if path is not a valid JSON path expression.
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(String path,
                      BigInteger value)
               throws JsonCache.CacheException
        Adds a BigInteger to an array. The array is created if it does not already exist.
        Parameters:
        path - A JSON Pointer expression for the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        IllegalArgumentException - if path is not a valid JSON path expression.
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(String path,
                      boolean value)
               throws JsonCache.CacheException
        Adds a boolean value to an array. The array is created if it does not already exist.
        Parameters:
        path - A JSON Pointer expression for the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        IllegalArgumentException - if path is not a valid JSON path expression.
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(String path,
                      double value)
               throws JsonCache.CacheException
        Adds a double value to an array. The array is created if it does not already exist.
        Parameters:
        path - A JSON Pointer expression for the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        IllegalArgumentException - if path is not a valid JSON path expression.
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(String path,
                      float value)
               throws JsonCache.CacheException
        Adds a float value to an array. The array is created if it does not already exist.
        Parameters:
        path - A JSON Pointer expression for the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        IllegalArgumentException - if path is not a valid JSON path expression.
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(String path,
                      int value)
               throws JsonCache.CacheException
        Adds an int value to an array. The array is created if it does not already exist.
        Parameters:
        path - A JSON Pointer expression for the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        IllegalArgumentException - if path is not a valid JSON path expression.
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(String path,
                      long value)
               throws JsonCache.CacheException
        Adds a long value to an array. The array is created if it does not already exist.
        Parameters:
        path - A JSON Pointer expression for the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        IllegalArgumentException - if path is not a valid JSON path expression.
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(String path,
                      Object value)
               throws JsonCache.CacheException
        Adds an object to an array. The array is created if it does not already exist.
        Parameters:
        path - A JSON Pointer expression for the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        IllegalArgumentException - if path is not a valid JSON path expression.
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
      • add

        JsonCache add​(String path,
                      short value)
               throws JsonCache.CacheException
        Adds a short value to an array. The array is created if it does not already exist.
        Parameters:
        path - A JSON Pointer expression for the property to set. If the last segment is a positive integer less than the current array size, value is inserted at the specified index; otherwise, it is appended to the end of the array.
        value - The value to add.
        Returns:
        The receiver, to support chaining.
        Throws:
        IllegalArgumentException - if path is not a valid JSON path expression.
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
      • child

        JsonCache child​(com.fasterxml.jackson.core.JsonPointer ptr)
        Returns a child cache rooted at the given location relative to the receiver's base pointer.
        Parameters:
        ptr - A pointer to the subtree managed by the new cache.
        Returns:
        The child cache.
        Throws:
        NullPointerException - if ptr is null.
      • child

        JsonCache child​(String path)
        Returns a child cache rooted at the given location relative to the receiver's base pointer.
        Parameters:
        path - A JSON Pointer expression for the subtree managed by the new cache. Note that the expression must start with a forward slash character.
        Returns:
        The child cache.
        Throws:
        IllegalArgumentException - if path is not a valid JSON path expression.
      • delete

        void delete​(com.fasterxml.jackson.core.JsonPointer ptr)
             throws JsonCache.CacheException
        Deletes a property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • delete

        void delete​(String path)
             throws JsonCache.CacheException
        Deletes a property within the object graph managed by the receiver.
        Parameters:
        path - A JSON Pointer expression for the property to set.
        Throws:
        IllegalArgumentException - if path is not a valid JSON path expression.
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • exists

        boolean exists​(com.fasterxml.jackson.core.JsonPointer ptr)
        Tests for the existence of the specified path within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the path to test.
        Returns:
        true if a JSON node corresponding to ptr exists.
      • exists

        boolean exists​(String path)
        Tests for the existence of the specified path within the object graph managed by the receiver.
        Parameters:
        path - A JSON Pointer expression for the path to test.
        Returns:
        true if a JSON node corresponding to ptr exists.
      • get

        Object get​(com.fasterxml.jackson.core.JsonPointer ptr)
            throws JsonCache.CacheException
        Retrieves an Object value from within the graph.
        Parameters:
        ptr - A JSON Pointer expression for the value to return.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • get

        Object get​(com.fasterxml.jackson.core.JsonPointer ptr,
                   Object defaultValue)
            throws JsonCache.CacheException
        Retrieves an Object value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A pointer to the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • get

        Object get​(String path,
                   Object defaultValue)
            throws JsonCache.CacheException
        Retrieves an Object value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getBigDecimal

        BigDecimal getBigDecimal​(com.fasterxml.jackson.core.JsonPointer ptr)
                          throws JsonCache.CacheException
        Retrieves a BigDecimal value from within the graph.
        Parameters:
        ptr - A pointer to the value to retrieve.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getBigDecimal

        BigDecimal getBigDecimal​(com.fasterxml.jackson.core.JsonPointer ptr,
                                 BigDecimal defaultValue)
                          throws JsonCache.CacheException
        Retrieves a BigDecimal value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A pointer to the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getBigDecimal

        BigDecimal getBigDecimal​(String path)
                          throws JsonCache.CacheException
        Retrieves a BigDecimal value from within the graph.
        Parameters:
        path - A JSON Pointer expression for the value to retrieve.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getBigDecimal

        BigDecimal getBigDecimal​(String path,
                                 BigDecimal defaultValue)
                          throws JsonCache.CacheException
        Retrieves a BigDecimal value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getBigInteger

        BigInteger getBigInteger​(com.fasterxml.jackson.core.JsonPointer ptr)
                          throws JsonCache.CacheException
        Retrieves a BigInteger value from within the graph.
        Parameters:
        ptr - A pointer to the value to retrieve.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getBigInteger

        BigInteger getBigInteger​(com.fasterxml.jackson.core.JsonPointer ptr,
                                 BigInteger defaultValue)
                          throws JsonCache.CacheException
        Retrieves a BigInteger value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getBigInteger

        BigInteger getBigInteger​(String path)
                          throws JsonCache.CacheException
        Retrieves a BigInteger value from within the graph.
        Parameters:
        path - A JSON Pointer expression for the value to retrieve.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getBigInteger

        BigInteger getBigInteger​(String path,
                                 BigInteger defaultValue)
                          throws JsonCache.CacheException
        Retrieves a BigInteger value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getBinary

        byte[] getBinary​(com.fasterxml.jackson.core.JsonPointer ptr)
                  throws JsonCache.CacheException
        Retrieves a byte[] value from within the graph.
        Parameters:
        ptr - A pointer to the value to retrieve.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getBinary

        byte[] getBinary​(com.fasterxml.jackson.core.JsonPointer ptr,
                         byte[] defaultValue)
                  throws JsonCache.CacheException
        Retrieves a byte[] value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getBinary

        byte[] getBinary​(String path)
                  throws JsonCache.CacheException
        Retrieves a byte[] value from within the graph.
        Parameters:
        path - A JSON Pointer expression for the value to retrieve.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getBinary

        byte[] getBinary​(String path,
                         byte[] defaultValue)
                  throws JsonCache.CacheException
        Retrieves a byte[] value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getBoolean

        boolean getBoolean​(com.fasterxml.jackson.core.JsonPointer ptr)
                    throws JsonCache.CacheException
        Retrieves a boolean value from within the graph.
        Parameters:
        ptr - A pointer to the value to retrieve.
        Returns:
        the property value or false if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getBoolean

        boolean getBoolean​(com.fasterxml.jackson.core.JsonPointer ptr,
                           boolean defaultValue)
                    throws JsonCache.CacheException
        Retrieves a boolean value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getBoolean

        boolean getBoolean​(String path)
                    throws JsonCache.CacheException
        Retrieves a boolean value from within the graph.
        Parameters:
        path - A JSON Pointer expression for the value to retrieve.
        Returns:
        the property value or false if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getBoolean

        boolean getBoolean​(String path,
                           boolean defaultValue)
                    throws JsonCache.CacheException
        Retrieves a boolean value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getDouble

        double getDouble​(com.fasterxml.jackson.core.JsonPointer ptr)
                  throws JsonCache.CacheException
        Retrieves a double value from within the graph.
        Parameters:
        ptr - A pointer to the value to retrieve.
        Returns:
        the property value or 0.0D if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getDouble

        double getDouble​(com.fasterxml.jackson.core.JsonPointer ptr,
                         double defaultValue)
                  throws JsonCache.CacheException
        Retrieves a double value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getDouble

        double getDouble​(String path)
                  throws JsonCache.CacheException
        Retrieves a double value from within the graph.
        Parameters:
        path - A JSON Pointer expression for the value to retrieve.
        Returns:
        the property value or 0.0D if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getDouble

        double getDouble​(String path,
                         double defaultValue)
                  throws JsonCache.CacheException
        Retrieves a double value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getFloat

        float getFloat​(com.fasterxml.jackson.core.JsonPointer ptr)
                throws JsonCache.CacheException
        Retrieves a float value from within the graph.
        Parameters:
        ptr - A pointer to the value to retrieve.
        Returns:
        the property value or 0.0F if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getFloat

        float getFloat​(com.fasterxml.jackson.core.JsonPointer ptr,
                       float defaultValue)
                throws JsonCache.CacheException
        Retrieves a float value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getFloat

        float getFloat​(String path)
                throws JsonCache.CacheException
        Retrieves a float value from within the graph.
        Parameters:
        path - A JSON Pointer expression for the value to retrieve.
        Returns:
        the property value or 0.0F if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getFloat

        float getFloat​(String path,
                       float defaultValue)
                throws JsonCache.CacheException
        Retrieves a float value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getInt

        int getInt​(com.fasterxml.jackson.core.JsonPointer ptr)
            throws JsonCache.CacheException
        Retrieves an int value from within the graph.
        Parameters:
        ptr - A pointer to the value to retrieve.
        Returns:
        the property value or 0 if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getInt

        int getInt​(com.fasterxml.jackson.core.JsonPointer ptr,
                   int defaultValue)
            throws JsonCache.CacheException
        Retrieves an int value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getInt

        int getInt​(String path)
            throws JsonCache.CacheException
        Retrieves an int value from within the graph.
        Parameters:
        path - A JSON Pointer expression for the value to retrieve.
        Returns:
        the property value or 0 if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getInt

        int getInt​(String path,
                   int defaultValue)
            throws JsonCache.CacheException
        Retrieves an int value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getLong

        long getLong​(com.fasterxml.jackson.core.JsonPointer ptr)
              throws JsonCache.CacheException
        Retrieves a long value from within the graph.
        Parameters:
        ptr - A pointer to the value to retrieve.
        Returns:
        the property value or 0L if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getLong

        long getLong​(com.fasterxml.jackson.core.JsonPointer ptr,
                     long defaultValue)
              throws JsonCache.CacheException
        Retrieves a long value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getLong

        long getLong​(String path)
              throws JsonCache.CacheException
        Retrieves a long value from within the graph.
        Parameters:
        path - A JSON Pointer expression for the value to retrieve.
        Returns:
        the property value or 0L if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getLong

        long getLong​(String path,
                     long defaultValue)
              throws JsonCache.CacheException
        Retrieves a long value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getNodeType

        com.fasterxml.jackson.databind.node.JsonNodeType getNodeType​(com.fasterxml.jackson.core.JsonPointer ptr)
        Returns the node type at the specified location in the object graph.
        Parameters:
        ptr - A pointer to the node to test.
        Returns:
        The node type.
      • getNodeType

        com.fasterxml.jackson.databind.node.JsonNodeType getNodeType​(String path)
        Returns the node type at the specified location in the object graph.
        Parameters:
        path - A JSON Pointer expression for the node to test.
        Returns:
        The node type.
      • getNumber

        Number getNumber​(com.fasterxml.jackson.core.JsonPointer ptr)
                  throws JsonCache.CacheException
        Retrieves a Number value from within the graph.
        Parameters:
        ptr - A pointer to the value to retrieve.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getNumber

        Number getNumber​(com.fasterxml.jackson.core.JsonPointer ptr,
                         Number defaultValue)
                  throws JsonCache.CacheException
        Retrieves a Number value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getNumber

        Number getNumber​(String path)
                  throws JsonCache.CacheException
        Retrieves a Number value from within the graph.
        Parameters:
        path - A JSON Pointer expression for the value to retrieve.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getNumber

        Number getNumber​(String path,
                         Number defaultValue)
                  throws JsonCache.CacheException
        Retrieves a Number value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getObject

        <T> T getObject​(com.fasterxml.jackson.core.JsonPointer ptr,
                        Class<T> type)
                 throws JsonCache.CacheException
        Retrieves a typed object value from within the graph.
        Type Parameters:
        T - The type of object to return.
        Parameters:
        ptr - A pointer to the value to return.
        type - The type of object to return.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver or if the node could not be converted to the requested type.
      • getObject

        <T> T getObject​(com.fasterxml.jackson.core.JsonPointer ptr,
                        T defaultValue)
                 throws JsonCache.CacheException
        Retrieves a typed object value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Type Parameters:
        T - The type of the object to return.
        Parameters:
        ptr - A pointer to the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver or if the node could not be converted to the requested type.
      • getObject

        <T> T getObject​(String path,
                        Class<T> type)
                 throws JsonCache.CacheException
        Retrieves a typed object value from within the graph.
        Type Parameters:
        T - The type of object to return.
        Parameters:
        path - A JSON pointer expression for the value to return.
        type - The type of object to return.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver or if the node could not be converted to the requested type.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getObject

        <T> T getObject​(String path,
                        T defaultValue)
                 throws JsonCache.CacheException
        Retrieves a typed object value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Type Parameters:
        T - The type of the object to return.
        Parameters:
        path - A JSON pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver or if the node could not be converted to the requested type.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getObjects

        <T> List<T> getObjects​(com.fasterxml.jackson.core.JsonPointer ptr,
                               Class<T> type)
                        throws JsonCache.CacheException
        Retrieves a typed list of objects from within the graph.
        Type Parameters:
        T - The list element type.
        Parameters:
        ptr - A pointer to the values to return.
        type - The list element type.
        Returns:
        the property values.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver or if the nodes could not be converted to the requested type.
      • getObjects

        <T> List<T> getObjects​(com.fasterxml.jackson.core.JsonPointer ptr,
                               Class<T> type,
                               List<T> defaultValue)
                        throws JsonCache.CacheException
        Retrieves a typed list of objects from within the graph. If the values are not present, stores defaultValue at the specified location and returns this value.
        Type Parameters:
        T - The list element type.
        Parameters:
        ptr - A pointer to the values to return.
        type - The list element type.
        defaultValue - The default values to return if ptr is not present in the graph.
        Returns:
        the property values.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver or if the nodes could not be converted to the requested type.
      • getObjects

        <T> List<T> getObjects​(String path,
                               Class<T> type)
                        throws JsonCache.CacheException
        Retrieves a typed list of objects from within the graph.
        Type Parameters:
        T - The list element type.
        Parameters:
        path - A JSON Pointer expression for the values to return.
        type - The list element type.
        Returns:
        the property values.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver or if the nodes could not be converted to the requested type.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getObjects

        <T> List<T> getObjects​(String path,
                               Class<T> type,
                               List<T> defaultValue)
                        throws JsonCache.CacheException
        Retrieves a typed list of objects from within the graph. If the values are not present, stores defaultValue at the specified location and returns this value.
        Type Parameters:
        T - The list element type.
        Parameters:
        path - A JSON Pointer expression for the values to return.
        type - The list element type.
        defaultValue - The default values to return if path is not present in the graph.
        Returns:
        the property values.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver or if the nodes could not be converted to the requested type.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getShort

        short getShort​(com.fasterxml.jackson.core.JsonPointer ptr)
                throws JsonCache.CacheException
        Retrieves a short value from within the graph.
        Parameters:
        ptr - A pointer to the value to retrieve.
        Returns:
        the property value or 0 if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getShort

        short getShort​(com.fasterxml.jackson.core.JsonPointer ptr,
                       short defaultValue)
                throws JsonCache.CacheException
        Retrieves a short value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getShort

        short getShort​(String path)
                throws JsonCache.CacheException
        Retrieves a short value from within the graph.
        Parameters:
        path - A JSON Pointer expression for the value to retrieve.
        Returns:
        the property value or 0 if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getShort

        short getShort​(String path,
                       short defaultValue)
                throws JsonCache.CacheException
        Retrieves a short value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getString

        String getString​(com.fasterxml.jackson.core.JsonPointer ptr)
                  throws JsonCache.CacheException
        Retrieves a String value from within the graph.
        Parameters:
        ptr - A pointer to the value to retrieve.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getString

        String getString​(com.fasterxml.jackson.core.JsonPointer ptr,
                         String defaultValue)
                  throws JsonCache.CacheException
        Retrieves a String value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        ptr - A pointer to the value to return.
        defaultValue - The default value to return if ptr is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
      • getString

        String getString​(String path)
                  throws JsonCache.CacheException
        Retrieves a String value from within the graph.
        Parameters:
        path - A JSON Pointer expression for the value to retrieve.
        Returns:
        the property value or null if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • getString

        String getString​(String path,
                         String defaultValue)
                  throws JsonCache.CacheException
        Retrieves a String value from within the graph. If the value is not present, stores defaultValue at the specified location and returns this value.
        Parameters:
        path - A JSON Pointer expression for the value to return.
        defaultValue - The default value to return if path is not present in the graph.
        Returns:
        the property value or defaultValue if not present.
        Throws:
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        IllegalArgumentException - if path is not a valid JSON path expression.
      • parent

        JsonCache parent()
        Returns the parent cache of which this is a descendant.
        Returns:
        The parent cache, null if the receiver is the root cache.
      • root

        JsonCache.Root root()
        Returns the root cache of which this is a descendant.
        Returns:
        The root cache. The root cache returns itself.
      • set

        JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr,
                      BigDecimal value)
               throws JsonCache.CacheException
        Sets a BigDecimal property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        value - The value to set (can be null).
        Returns:
        The receiver, to allow chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(JsonPointer)
      • set

        JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr,
                      BigInteger value)
               throws JsonCache.CacheException
        Sets a BigInteger property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        value - The value to set (can be null).
        Returns:
        The receiver, to allow chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(JsonPointer)
      • set

        JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr,
                      boolean value)
               throws JsonCache.CacheException
        Sets a boolean property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        value - The value to set.
        Returns:
        The receiver, to allow chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(JsonPointer)
      • set

        JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr,
                      double value)
               throws JsonCache.CacheException
        Sets a double property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        value - The value to set.
        Returns:
        The receiver, to allow chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(JsonPointer)
      • set

        JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr,
                      float value)
               throws JsonCache.CacheException
        Sets a float property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        value - The value to set.
        Returns:
        The receiver, to allow chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(JsonPointer)
      • set

        JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr,
                      int value)
               throws JsonCache.CacheException
        Sets an int property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        value - The value to set.
        Returns:
        The receiver, to allow chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(JsonPointer)
      • set

        JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr,
                      List<?> values)
               throws JsonCache.CacheException
        Sets a List property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        values - The values to set.
        Returns:
        The receiver, to allow chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(JsonPointer)
      • set

        JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr,
                      long value)
               throws JsonCache.CacheException
        Sets a long property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        value - The value to set.
        Returns:
        The receiver, to allow chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(JsonPointer)
      • set

        JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr,
                      Object value)
               throws JsonCache.CacheException
        Sets an Object property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        value - The value to set (can be null).
        Returns:
        The receiver, to allow chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(JsonPointer)
      • set

        JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr,
                      short value)
               throws JsonCache.CacheException
        Sets a short property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        value - The value to set.
        Returns:
        The receiver, to allow chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(JsonPointer)
      • set

        JsonCache set​(com.fasterxml.jackson.core.JsonPointer ptr,
                      String value)
               throws JsonCache.CacheException
        Sets a String property within the object graph managed by the receiver.
        Parameters:
        ptr - A pointer to the property to set.
        value - The value to set (can be null).
        Returns:
        The receiver, to allow chaining.
        Throws:
        JsonCache.CacheException - if ptr is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(JsonPointer)
      • set

        JsonCache set​(String path,
                      boolean value)
               throws JsonCache.CacheException
        Sets a boolean property within the object graph managed by the receiver.
        Parameters:
        path - A JSON Pointer expression for the property to set.
        value - The value to set.
        Returns:
        The receiver, to allow chaining.
        Throws:
        IllegalArgumentException - if path is not a valid JSON Pointer expression.
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(String)
      • set

        JsonCache set​(String path,
                      double value)
               throws JsonCache.CacheException
        Sets a double property within the object graph managed by the receiver.
        Parameters:
        path - A JSON Pointer expression for the property to set.
        value - The value to set.
        Returns:
        The receiver, to allow chaining.
        Throws:
        IllegalArgumentException - if path is not a valid JSON Pointer expression.
        JsonCache.CacheException - if path is not a valid path within the object graph managed by the receiver.
        See Also:
        delete(String)
      • size

        int size​(com.fasterxml.jackson.core.JsonPointer ptr)
        Returns the size of a node within the object graph managed by the receiver. For an array node, size is the number of elements; for an object node, size is the number of properties; for other node types, size is 0.
        Parameters:
        ptr - A pointer to the node.
        Returns:
        The size of the node, or 0 if it does not exist.
        See Also:
        delete(String)
      • size

        int size​(String path)
        Returns the size of a node within the object graph managed by the receiver. For an array node, size is the number of elements; for an object node, size is the number of properties; for other node types, size is 0.
        Parameters:
        path - A JSON pointer expression for the node.
        Returns:
        The size of the node, or 0 if it does not exist.
        Throws:
        IllegalArgumentException - if path is not a valid JSON Pointer expression.
        See Also:
        delete(String)