Class OSHDBDatabase

    • Constructor Detail

      • OSHDBDatabase

        public OSHDBDatabase()
    • Method Detail

      • createMapReducer

        public abstract <X extends OSHDBMapReducibleMapReducer<X> createMapReducer​(Class<X> forClass)
        Factory function that creates a mapReducer object of the appropriate data type class for this oshdb backend implemenation.
        Parameters:
        forClass - the data type class to iterate over in the `mapping` function of the generated MapReducer
        Returns:
        a new mapReducer object operating on the given OSHDB backend
      • metadata

        public abstract String metadata​(String property)
        Returns metadata about the given OSHDB.

        For example copyright information, currentness of the data, spatial extent, etc.

        Specified by:
        metadata in class OSHDB
        Parameters:
        property - the metadata property to request
        Returns:
        the value of the requested metadata field
      • prefix

        public OSHDBDatabase prefix​(String prefix)
        Sets the "table/cache" name prefix to be used with this oshdb.
      • prefix

        public String prefix()
        Returns the currently set db "table/cache" name prefix.
      • timeout

        public OSHDBDatabase timeout​(double seconds)
        Set a timeout for queries on this oshdb backend.

        If a query takes longer than the given time limit, a OSHDBTimeoutException will be thrown.

        Parameters:
        seconds - time (in seconds) a query is allowed to run for.
        Returns:
        the current oshdb object
      • clearTimeout

        public OSHDBDatabase clearTimeout()
        Clears a previously set timeout for queries on this oshdb backend.
        Returns:
        the current oshdb object
      • timeoutInMilliseconds

        public OSHDBDatabase timeoutInMilliseconds​(long milliSeconds)
        Set a timeout for queries on this oshdb backend.

        If a query takes longer than the given time limit, a OSHDBTimeoutException will be thrown.

        Parameters:
        milliSeconds - time (in milliseconds) a query is allowed to run for.
        Returns:
        the current oshdb object
      • timeoutInMilliseconds

        public OptionalLong timeoutInMilliseconds()
        Gets the timeout for queries on this oshdb backend, if present.
        Returns:
        the currently set query timeout in milliseconds