| Modifier and Type | Field and Description |
|---|---|
| private final AsynchronousFileChannel | |
| private boolean | |
| private Runnable | |
| private final ContextInternal | |
| public static final int | |
| private Handler | |
| private Handler | |
| private Handler | |
| private Handler | |
| private static CompletionHandler | |
| private static final Logger | |
| private int | |
| private int | |
| private boolean | |
| private InboundBuffer | |
| private int | |
| private long | |
| private long | |
| private final VertxInternal | |
| private long | |
| private long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| public Future | |
| public void | close(Handler<AsyncResult<Void>>
the handler handler)Implements io. Close the file. |
| private synchronized void | |
| private void | |
| private synchronized void | |
| private void | |
| private synchronized void | |
| private void | |
| private synchronized void | |
| private synchronized void | |
| private void | |
| public synchronized AsyncFile | |
| public Future | |
| public void | end(Handler<AsyncResult<Void>> handler)
Overrides default io. Implements io. Same as |
| public synchronized AsyncFile | |
| public synchronized AsyncFile | exceptionHandler(Handler<Throwable> handler)
Implements io.
|
| public AsyncFile | fetch(long amount)
Implements io. Fetch the specified |
| public Future | flush()
Implements io. Flush any writes made to this file to underlying persistent storage. |
| public AsyncFile | flush(Handler<AsyncResult<Void>> handler)
Implements io. Same as |
| public synchronized long | |
| public synchronized long | |
| private void | handleBuffer(Buffer buff)
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private void | |
| private void | |
| public synchronized AsyncFile | |
| public Future | |
| public void | lock(Handler<AsyncResult<AsyncFileLock>> handler)
Implements io. Like |
| public Future | lock(long
where the region starts position, long the size of the region size, boolean whether the lock should be shared shared)Implements io. Acquire a lock on a portion of this file. |
| public void | lock(long position, long size, boolean shared, Handler<AsyncResult<AsyncFileLock>> handler)
Implements io. Like |
| public synchronized AsyncFile | pause()
Implements io. Pause the |
| public synchronized AsyncFile | read(Buffer
the buffer to read into buffer, int the offset into the buffer where the data will be read offset, long the position in the file where to start reading position, int the number of bytes to read length, Handler<AsyncResult<Buffer>> the handler to call when the write is complete handler)Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Reads |
| public Future | read(Buffer buffer, int offset, long position, int length)
Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Like |
| public synchronized AsyncFile | resume()
Implements io. Resume reading, and sets the buffer in |
| public synchronized AsyncFile | setReadBufferSize(int
the buffer size readBufferSize)Implements io. Sets the buffer size that will be used to read the data from the file. |
| public synchronized AsyncFile | setReadLength(long
the bytes that will be read from the file readLength)Implements io. Sets the number of bytes that will be read when using the file as a |
| public synchronized AsyncFile | setReadPos(long
the position in the file readPos)Implements io. Sets the position from which data will be read from when using the file as a |
| public synchronized AsyncFile | setWritePos(long
the position in the file writePos)Implements io. Sets the position from which data will be written when using the file as a |
| public synchronized AsyncFile | setWriteQueueMaxSize(int
the max size of the write stream maxSize)Implements io. Set the maximum size of the write queue to |
| public Future | |
| public long | |
| public AsyncFileLock | tryLock()
Implements io. Try to acquire a non-shared lock on the entire file. |
| public AsyncFileLock | tryLock(long
where the region starts position, long the size of the region size, boolean whether the lock should be shared shared)Implements io. Try to acquire a lock on a portion of this file. |
| public void | write(Buffer
the buffer to write buffer, long the position in the file to write it at position, Handler<AsyncResult<Void>> the handler to call when the write is complete handler)Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Write a |
| public Future | write(Buffer buffer, long position)
Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Like |
| public Future | write(Buffer
the data to write buffer)Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Write some data to the stream. |
| public synchronized void | write(Buffer buffer, Handler<AsyncResult<Void>> handler)
Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Same as |
| private void | |
| public synchronized boolean | writeQueueFull()
Implements io. This will return |
| ch | back to summary |
|---|---|
| private final AsynchronousFileChannel ch | |
| closed | back to summary |
|---|---|
| private boolean closed | |
| closedDeferred | back to summary |
|---|---|
| private Runnable closedDeferred | |
| context | back to summary |
|---|---|
| private final ContextInternal context | |
| DEFAULT_READ_BUFFER_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_READ_BUFFER_SIZE | |
| drainHandler | back to summary |
|---|---|
| private Handler<Void> drainHandler | |
| endHandler | back to summary |
|---|---|
| private Handler<Void> endHandler | |
| exceptionHandler | back to summary |
|---|---|
| private Handler<Throwable> exceptionHandler | |
| handler | back to summary |
|---|---|
| private Handler<Buffer> handler | |
| LOCK_COMPLETION | back to summary |
|---|---|
| private static CompletionHandler<FileLock, PromiseInternal<AsyncFileLock>> LOCK_COMPLETION | |
| log | back to summary |
|---|---|
| private static final Logger log | |
| lwm | back to summary |
|---|---|
| private int lwm | |
| maxWrites | back to summary |
|---|---|
| private int maxWrites | |
| overflow | back to summary |
|---|---|
| private boolean overflow | |
| queue | back to summary |
|---|---|
| private InboundBuffer<Buffer> queue | |
| readBufferSize | back to summary |
|---|---|
| private int readBufferSize | |
| readLength | back to summary |
|---|---|
| private long readLength | |
| readPos | back to summary |
|---|---|
| private long readPos | |
| vertx | back to summary |
|---|---|
| private final VertxInternal vertx | |
| writePos | back to summary |
|---|---|
| private long writePos | |
| writesOutstanding | back to summary |
|---|---|
| private long writesOutstanding | |
| AsyncFileImpl | back to summary |
|---|---|
| pack-priv AsyncFileImpl(VertxInternal vertx, String path, OpenOptions options, ContextInternal context) | |
| check | back to summary |
|---|---|
| private void check() | |
| checkClosed | back to summary |
|---|---|
| private void checkClosed() | |
| checkContext | back to summary |
|---|---|
| private void checkContext() | |
| close | back to summary |
|---|---|
| public Future Implements io. Doc from io. Close the file. The actual close happens asynchronously. | |
| close | back to summary |
|---|---|
| public void close(Handler<AsyncResult<Void>> handler) Implements io. Doc from io. Close the file. The actual close happens asynchronously. The handler will be called when the close is complete, or an error occurs.
| |
| closeInternal | back to summary |
|---|---|
| private synchronized void closeInternal(Handler<AsyncResult<Void>> handler) | |
| doClose | back to summary |
|---|---|
| private void doClose(Handler<AsyncResult<Void>> handler) | |
| doFlush | back to summary |
|---|---|
| private synchronized void doFlush(Handler<AsyncResult<Void>> handler) | |
| doRead | back to summary |
|---|---|
| private void doRead() | |
| doRead | back to summary |
|---|---|
| private synchronized void doRead(ByteBuffer bb) | |
| doRead | back to summary |
|---|---|
| private void doRead(Buffer writeBuff, int offset, ByteBuffer buff, long position, Promise<Buffer> promise)
References Deprecated
See corresponding docs for further information. | |
| doWrite | back to summary |
|---|---|
| private synchronized void doWrite(Buffer buffer, long position, Handler<AsyncResult<Void>> handler)
References Deprecated
See corresponding docs for further information. | |
| doWrite | back to summary |
|---|---|
| private synchronized void doWrite(ByteBuffer[] buffers, long position, Handler<AsyncResult<Void>> handler) | |
| doWrite | back to summary |
|---|---|
| private void doWrite(ByteBuffer buff, long position, long toWrite, Handler<AsyncResult<Void>> handler) | |
| drainHandler | back to summary |
|---|---|
| public synchronized AsyncFile drainHandler(Handler<Void> handler) Implements io.
| |
| end | back to summary |
|---|---|
| public Future Overrides default io. Doc from io. Ends the stream. Once the stream has ended, it cannot be used any more. | |
| end | back to summary |
|---|---|
| public void end(Handler<AsyncResult<Void>> handler) Overrides default io. Implements io. Doc from io. Same as
| |
| endHandler | back to summary |
|---|---|
| public synchronized AsyncFile endHandler(Handler<Void> handler) Implements io.
| |
| exceptionHandler | back to summary |
|---|---|
| public synchronized AsyncFile exceptionHandler(Handler<Throwable> handler) Implements io.
| |
| fetch | back to summary |
|---|---|
| public AsyncFile fetch(long amount) Implements io. Doc from io. Fetch the specified | |
| flush | back to summary |
|---|---|
| public Future Implements io. Doc from io. Flush any writes made to this file to underlying persistent storage.
If the file was opened with The actual flush will happen asynchronously. | |
| flush | back to summary |
|---|---|
| public AsyncFile flush(Handler<AsyncResult<Void>> handler) Implements io. Doc from io. Same as
| |
| getReadLength | back to summary |
|---|---|
| public synchronized long getReadLength() Implements io.
| |
| getWritePos | back to summary |
|---|---|
| public synchronized long getWritePos() Implements io.
| |
| handleBuffer | back to summary |
|---|---|
| private void handleBuffer(Buffer buff)
References Deprecated
See corresponding docs for further information. | |
| handleEnd | back to summary |
|---|---|
| private void handleEnd() | |
| handleException | back to summary |
|---|---|
| private void handleException(Throwable t) | |
| handler | back to summary |
|---|---|
| public synchronized AsyncFile handler(Handler<Buffer> handler) Implements io.
| |
| lock | back to summary |
|---|---|
| public Future Implements io. Doc from io. Acquire a non-shared lock on the entire file.
| |
| lock | back to summary |
|---|---|
| public void lock(Handler<AsyncResult<AsyncFileLock>> handler) Implements io. Doc from io. Like
| |
| lock | back to summary |
|---|---|
| public Future Implements io. Doc from io. Acquire a lock on a portion of this file.
| |
| lock | back to summary |
|---|---|
| public void lock(long position, long size, boolean shared, Handler<AsyncResult<AsyncFileLock>> handler) Implements io. Doc from io. Like
| |
| pause | back to summary |
|---|---|
| public synchronized AsyncFile pause() Implements io. Doc from io. Pause the
While it's paused, no data will be sent to the data | |
| read | back to summary |
|---|---|
| public synchronized AsyncFile read(Buffer buffer, int offset, long position, int length, Handler<AsyncResult<Buffer>> handler) Implements io. Doc from io. References Deprecated
See corresponding docs for further information. Reads
The read data will be written into the specified If data is read past the end of the file then zero bytes will be read. When multiple reads are invoked on the same file there are no guarantees as to order in which those reads actually occur. The handler will be called when the close is complete, or if an error occurs.
| |
| read | back to summary |
|---|---|
| public Future Implements io. Doc from io. References Deprecated
See corresponding docs for further information. Like
| |
| resume | back to summary |
|---|---|
| public synchronized AsyncFile resume() Implements io. Doc from io. Resume reading, and sets the buffer in
If the | |
| setReadBufferSize | back to summary |
|---|---|
| public synchronized AsyncFile setReadBufferSize(int readBufferSize) Implements io. Doc from io. Sets the buffer size that will be used to read the data from the file. Changing this value will impact how much the data will be read at a time from the file system. | |
| setReadLength | back to summary |
|---|---|
| public synchronized AsyncFile setReadLength(long readLength) Implements io. Doc from io. Sets the number of bytes that will be read when using the file as a | |
| setReadPos | back to summary |
|---|---|
| public synchronized AsyncFile setReadPos(long readPos) Implements io. Doc from io. Sets the position from which data will be read from when using the file as a | |
| setWritePos | back to summary |
|---|---|
| public synchronized AsyncFile setWritePos(long writePos) Implements io. Doc from io. Sets the position from which data will be written when using the file as a | |
| setWriteQueueMaxSize | back to summary |
|---|---|
| public synchronized AsyncFile setWriteQueueMaxSize(int maxSize) Implements io. Doc from io. Set the maximum size of the write queue to
The value is defined by the implementation of the stream, e.g in bytes for a
| |
| size | back to summary |
|---|---|
| public Future Implements io.
| |
| sizeBlocking | back to summary |
|---|---|
| public long sizeBlocking() Implements io. Doc from io. Like
| |
| tryLock | back to summary |
|---|---|
| public AsyncFileLock tryLock() Implements io. Doc from io. Try to acquire a non-shared lock on the entire file.
| |
| tryLock | back to summary |
|---|---|
| public AsyncFileLock tryLock(long position, long size, boolean shared) Implements io. Doc from io. Try to acquire a lock on a portion of this file.
| |
| write | back to summary |
|---|---|
| public void write(Buffer buffer, long position, Handler<AsyncResult<Void>> handler) Implements io. Doc from io. References Deprecated
See corresponding docs for further information. Write a
If When multiple writes are invoked on the same file there are no guarantees as to order in which those writes actually occur The handler will be called when the write is complete, or if an error occurs.
| |
| write | back to summary |
|---|---|
| public Future Implements io. Doc from io. References Deprecated
See corresponding docs for further information. Like
| |
| write | back to summary |
|---|---|
| public Future Implements io. Doc from io. References Deprecated
See corresponding docs for further information. Write some data to the stream. The data is usually put on an internal write queue, and the write actually happens
asynchronously. To avoid running out of memory by putting too much on the write queue,
check the When the | |
| write | back to summary |
|---|---|
| public synchronized void write(Buffer buffer, Handler<AsyncResult<Void>> handler) Implements io. Doc from io. References Deprecated
See corresponding docs for further information. Same as
| |
| writeInternal | back to summary |
|---|---|
| private void writeInternal(ByteBuffer buff, long position, Handler<AsyncResult<Void>> handler) | |
| writeQueueFull | back to summary |
|---|---|
| public synchronized boolean writeQueueFull() Implements io. Doc from io. This will return
| |