Package com.arcadedb.engine
Class PaginatedFile
- java.lang.Object
-
- com.arcadedb.engine.PaginatedFile
-
public class PaginatedFile extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PaginatedFile.MODE
-
Constructor Summary
Constructors Modifier Constructor Description PaginatedFile()
protected
PaginatedFile(String filePath, PaginatedFile.MODE mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
calculateChecksum()
void
close()
void
drop()
void
flush()
String
getComponentName()
String
getFileExtension()
int
getFileId()
String
getFileName()
String
getFilePath()
File
getOSFile()
int
getPageSize()
long
getSize()
long
getTotalPages()
int
getVersion()
boolean
isOpen()
void
read(ImmutablePage page)
void
rename(String newFileName)
void
setFileId(int fileId)
String
toString()
int
write(MutablePage page)
Returns the byte written.
-
-
-
Constructor Detail
-
PaginatedFile
public PaginatedFile()
-
PaginatedFile
protected PaginatedFile(String filePath, PaginatedFile.MODE mode) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-
Method Detail
-
close
public void close()
-
rename
public void rename(String newFileName) throws IOException
- Throws:
IOException
-
drop
public void drop() throws IOException
- Throws:
IOException
-
getSize
public long getSize() throws IOException
- Throws:
IOException
-
getTotalPages
public long getTotalPages() throws IOException
- Throws:
IOException
-
flush
public void flush() throws IOException
- Throws:
IOException
-
getFileName
public String getFileName()
-
calculateChecksum
public long calculateChecksum() throws IOException
- Throws:
IOException
-
write
public int write(MutablePage page) throws IOException
Returns the byte written. Current implementation flushes always the entire page because (1) there is not a sensible increase of performance and (2) in case a page is modified multiple times before the flush now it's overwritten in the writeCache map.- Throws:
IOException
-
read
public void read(ImmutablePage page) throws IOException
- Throws:
IOException
-
isOpen
public boolean isOpen()
-
getFilePath
public String getFilePath()
-
getComponentName
public String getComponentName()
-
getFileExtension
public String getFileExtension()
-
getFileId
public int getFileId()
-
getOSFile
public File getOSFile()
-
setFileId
public void setFileId(int fileId)
-
getPageSize
public int getPageSize()
-
getVersion
public int getVersion()
-
-