Class PostgresFullPrunedBlockStore

    • Constructor Detail

      • PostgresFullPrunedBlockStore

        public PostgresFullPrunedBlockStore​(NetworkParameters params,
                                            int fullStoreDepth,
                                            java.lang.String hostname,
                                            java.lang.String dbName,
                                            java.lang.String username,
                                            java.lang.String password)
                                     throws BlockStoreException
        Creates a new PostgresFullPrunedBlockStore.
        Parameters:
        params - A copy of the NetworkParameters used
        fullStoreDepth - The number of blocks of history stored in full (something like 1000 is pretty safe)
        hostname - The hostname of the database to connect to
        dbName - The database to connect to
        username - The database username
        password - The password to the database
        Throws:
        BlockStoreException - if the database fails to open for any reason
      • PostgresFullPrunedBlockStore

        public PostgresFullPrunedBlockStore​(NetworkParameters params,
                                            int fullStoreDepth,
                                            java.lang.String hostname,
                                            java.lang.String dbName,
                                            java.lang.String username,
                                            java.lang.String password,
                                            @Nullable
                                            java.lang.String schemaName)
                                     throws BlockStoreException

        Create a new PostgresFullPrunedBlockStore, storing the tables in the schema specified. You may want to specify a schema to avoid name collisions, or just to keep the database better organized. The schema is not required, and if one is not provided than the default schema for the username will be used. See the postgres schema docs for more on schemas.

        Parameters:
        params - A copy of the NetworkParameters used.
        fullStoreDepth - The number of blocks of history stored in full (something like 1000 is pretty safe).
        hostname - The hostname of the database to connect to.
        dbName - The database to connect to.
        username - The database username.
        password - The password to the database.
        schemaName - The name of the schema to put the tables in. May be null if no schema is being used.
        Throws:
        BlockStoreException - If the database fails to open for any reason.