public final class AsyncFile extends Object implements OFile
HEADER_SIZE
Constructor and Description |
---|
AsyncFile(Path osFile,
boolean useNativeOsAPI) |
Modifier and Type | Method and Description |
---|---|
long |
allocateSpace(int size) |
void |
close() |
void |
create() |
void |
delete() |
boolean |
exists() |
long |
getFileSize() |
String |
getName() |
boolean |
isOpen() |
void |
open() |
void |
read(long offset,
ByteBuffer buffer,
boolean throwOnEof) |
void |
renameTo(Path newFile) |
void |
replaceContentWith(Path newContentFile) |
void |
shrink(long size) |
void |
synch() |
IOResult |
write(List<ORawPair<Long,ByteBuffer>> buffers) |
void |
write(long offset,
ByteBuffer buffer) |
public AsyncFile(Path osFile, boolean useNativeOsAPI)
public void create() throws IOException
create
in interface OFile
IOException
public void open()
open
in interface OClosableItem
open
in interface OFile
public long getFileSize()
getFileSize
in interface OFile
public boolean isOpen()
isOpen
in interface OClosableItem
isOpen
in interface OFile
public void write(long offset, ByteBuffer buffer)
public IOResult write(List<ORawPair<Long,ByteBuffer>> buffers)
public void read(long offset, ByteBuffer buffer, boolean throwOnEof) throws IOException
read
in interface OFile
IOException
public long allocateSpace(int size) throws IOException
allocateSpace
in interface OFile
IOException
public void shrink(long size) throws IOException
shrink
in interface OFile
IOException
public void close()
close
in interface OClosableItem
close
in interface OFile
public void delete() throws IOException
delete
in interface OFile
IOException
public void renameTo(Path newFile) throws IOException
renameTo
in interface OFile
IOException
public void replaceContentWith(Path newContentFile) throws IOException
replaceContentWith
in interface OFile
IOException
Copyright © 2009–2020 OrientDB. All rights reserved.