Module methanol

Interface Store.EntryWriter

  • Enclosing interface:
    Store

    public static interface Store.EntryWriter
    A writer for an entry's data stream.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default int write​(java.nio.ByteBuffer src)
      Synchronous variant of write(ByteBuffer, Executor).
      default java.util.concurrent.CompletableFuture<java.lang.Integer> write​(java.nio.ByteBuffer src, java.util.concurrent.Executor executor)
      Writes all the bytes from the given buffer into the editor's data stream, and returns the number of bytes actually written.
      default long write​(java.util.List<java.nio.ByteBuffer> srcs)
      Synchronous variant of write(List, Executor).
      java.util.concurrent.CompletableFuture<java.lang.Long> write​(java.util.List<java.nio.ByteBuffer> srcs, java.util.concurrent.Executor executor)
      Writes all the bytes from the given buffers into the editor's data stream, in sequential order, and returns the number of bytes actually written.
    • Method Detail

      • write

        default int write​(java.nio.ByteBuffer src)
                   throws java.io.IOException
        Synchronous variant of write(ByteBuffer, Executor).
        Throws:
        java.lang.IllegalStateException - if the editor is closed or if a write is currently in progress and the store doesn't allow concurrent writes
        java.io.IOException
      • write

        default java.util.concurrent.CompletableFuture<java.lang.Integer> write​(java.nio.ByteBuffer src,
                                                                                java.util.concurrent.Executor executor)
        Writes all the bytes from the given buffer into the editor's data stream, and returns the number of bytes actually written.
        Throws:
        java.lang.IllegalStateException - if the editor is closed or if a write is currently in progress and the store doesn't allow concurrent writes
      • write

        default long write​(java.util.List<java.nio.ByteBuffer> srcs)
                    throws java.io.IOException
        Synchronous variant of write(List, Executor).
        Throws:
        java.lang.IllegalStateException - if the editor is closed or if a write is currently in progress and the store doesn't allow concurrent writes
        java.io.IOException
      • write

        java.util.concurrent.CompletableFuture<java.lang.Long> write​(java.util.List<java.nio.ByteBuffer> srcs,
                                                                     java.util.concurrent.Executor executor)
        Writes all the bytes from the given buffers into the editor's data stream, in sequential order, and returns the number of bytes actually written.
        Throws:
        java.lang.IllegalStateException - if the editor is closed or if a write is currently in progress and the store doesn't allow concurrent writes