Interface LocalDatabase

All Superinterfaces:
AutoCloseable, eu.cloudnetservice.driver.database.Database, eu.cloudnetservice.driver.base.Named

public interface LocalDatabase extends eu.cloudnetservice.driver.database.Database
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    iterate(@NonNull BiConsumer<String, eu.cloudnetservice.driver.document.Document> consumer)
    Iterates over all entries in the database This option should not be used with big databases Use iterate(BiConsumer, int)} instead
    void
    iterate(@NonNull BiConsumer<String, eu.cloudnetservice.driver.document.Document> consumer, int chunkSize)
    Iterates over all entries in the database, but in chunks in the given size
    @Nullable Map<String, eu.cloudnetservice.driver.document.Document>
    readChunk(long beginIndex, int chunkSize)
     

    Methods inherited from interface AutoCloseable

    close

    Methods inherited from interface eu.cloudnetservice.driver.database.Database

    clear, clearAsync, contains, containsAsync, delete, deleteAsync, documentCount, documentCountAsync, documents, documentsAsync, entries, entriesAsync, find, find, findAsync, findAsync, get, getAsync, insert, insertAsync, keys, keysAsync, synced

    Methods inherited from interface eu.cloudnetservice.driver.base.Named

    name
  • Method Details

    • iterate

      void iterate(@NonNull @NonNull BiConsumer<String, eu.cloudnetservice.driver.document.Document> consumer)
      Iterates over all entries in the database This option should not be used with big databases Use iterate(BiConsumer, int)} instead
      Parameters:
      consumer - the consumer to pass the entries into
    • iterate

      void iterate(@NonNull @NonNull BiConsumer<String, eu.cloudnetservice.driver.document.Document> consumer, int chunkSize)
      Iterates over all entries in the database, but in chunks in the given size
      Parameters:
      consumer - the consumer to pass the entries into
      chunkSize - the chunkSize of the entries
    • readChunk

      @Nullable @Nullable Map<String, eu.cloudnetservice.driver.document.Document> readChunk(long beginIndex, int chunkSize)