Class QueueFile.Builder

java.lang.Object
io.sentry.cache.tape.QueueFile.Builder
Enclosing class:
QueueFile

public static final class QueueFile.Builder extends Object
Fluent API for creating QueueFile instances.
  • Constructor Details

    • Builder

      public Builder(File file)
      Start constructing a new queue backed by the given file.
  • Method Details

    • zero

      public QueueFile.Builder zero(boolean zero)
      When true, removing an element will also overwrite data with zero bytes.
    • size

      public QueueFile.Builder size(int size)
      The maximum number of elements this queue can hold before wrapping around.
    • build

      public QueueFile build() throws IOException
      Constructs a new queue backed by the given builder. Only one instance should access a given file at a time.
      Throws:
      IOException