Package datomic

Class QueryRequest


  • public class QueryRequest
    extends java.lang.Object
    Container for parameters to Peer.query(QueryRequest)
    Since:
    0.9.5153
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.Object ARGS  
      static java.lang.Object QUERY  
      static java.lang.Object TIMEOUT  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map asData()  
      static QueryRequest create​(java.lang.Object query, java.lang.Object... inputs)
      Creates a QueryRequest object.
      QueryRequest timeout​(long timeoutMsec)
      The number of milliseconds after which a query may be stopped.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ARGS

        public static final java.lang.Object ARGS
      • QUERY

        public static final java.lang.Object QUERY
      • TIMEOUT

        public static final java.lang.Object TIMEOUT
    • Method Detail

      • create

        public static QueryRequest create​(java.lang.Object query,
                                          java.lang.Object... inputs)
        Creates a QueryRequest object. query and inputs take the same form as described in Peer.query(Object, Object...)
        Parameters:
        query - a data structure describing the query
        inputs - inputs bound to the names in :in section of query
        Returns:
        a QueryRequest object that can be passed to Peer.query(QueryRequest)
      • timeout

        public QueryRequest timeout​(long timeoutMsec)

        The number of milliseconds after which a query may be stopped.

        Note: timeout is approximate, it is meant to protect against long running queries, but is not guaranteed to stop after precisely the duration specified.

        Parameters:
        timeoutMsec - number of milliseconds after which a query may be stopped.
        Returns:
        A reference to the updated QueryRequest so methods can be chained together.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the QueryRequest
      • asData

        public java.util.Map asData()
        Returns:
        A Map representation of the QueryRequest