Class OSHDBIgnite

    • Constructor Detail

      • OSHDBIgnite

        public OSHDBIgnite()
        Create a new OSHDBDatabase based on default ("ignite-config.xml") configuration.
        Throws:
        OSHDBException - if cluster state is not active.
      • OSHDBIgnite

        public OSHDBIgnite​(org.apache.ignite.Ignite ignite)
        Creates a new OSHDBDatabase using the given Ignite instance.
        Parameters:
        ignite - Ignite instance to use.
        Throws:
        OSHDBException - if cluster state is not active.
      • OSHDBIgnite

        public OSHDBIgnite​(String igniteConfigFilePath)
        Opens a connection to oshdb data stored on an Ignite cluster.
        Parameters:
        igniteConfigFilePath - ignite configuration file
        Throws:
        OSHDBException - if cluster state is not active.
      • OSHDBIgnite

        public OSHDBIgnite​(File igniteConfig)
        Opens a connection to oshdb data stored on an Ignite cluster.
        Parameters:
        igniteConfig - ignite configuration file
        Throws:
        OSHDBException - if cluster state is not active.
    • Method Detail

      • createMapReducer

        public <X extends OSHDBMapReducibleMapReducer<X> createMapReducer​(Class<X> forClass)
        Description copied from class: OSHDBDatabase
        Factory function that creates a mapReducer object of the appropriate data type class for this oshdb backend implemenation.
        Specified by:
        createMapReducer in class OSHDBDatabase
        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 String metadata​(String property)
        Description copied from class: OSHDBDatabase
        Returns metadata about the given OSHDB.

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

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

        public org.apache.ignite.Ignite getIgnite()
        Returns the actual Ignite instance.
        Returns:
        Ignite instance
      • computeMode

        public OSHDBIgnite computeMode​(OSHDBIgnite.ComputeMode computeMode)
        Sets the compute mode.
        Parameters:
        computeMode - the compute mode to be used in calculations on this oshdb backend
        Returns:
        this backend
      • computeMode

        public OSHDBIgnite.ComputeMode computeMode()
        Gets the set compute mode.
        Returns:
        the currently set compute mode
      • onClose

        public OSHDBIgnite onClose​(org.apache.ignite.lang.IgniteRunnable action)
        Sets a callback to be executed on all ignite workers after the query has been finished.

        This can be used to close connections to (temporary) databases that were used to store or retrieve intermediate data.

        Parameters:
        action - the callback to execute after a query is done
        Returns:
        the current oshdb database object
      • onClose

        public Optional<org.apache.ignite.lang.IgniteRunnable> onClose()
        Gets the onClose callback.
        Returns:
        the currently set onClose callback