public class MongoFile extends java.lang.Object implements NosqlFile
| Modifier and Type | Field and Description |
|---|---|
protected short |
fileNumber |
protected short |
indexNumber |
| Modifier | Constructor and Description |
|---|---|
protected |
MongoFile(MongoDirectory mongoDirectory,
java.lang.String fileName,
short fileNumber,
int blockSize) |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearCache() |
void |
close() |
void |
flush() |
int |
getBlockSize() |
static long |
getCacheSize() |
long |
getChecksum() |
long |
getFileLength() |
java.lang.String |
getFileName() |
short |
getFileNumber() |
long |
getLastModified() |
byte |
readByte(long position) |
void |
readBytes(long position,
byte[] b,
int offset,
int length) |
int |
readInt(long position) |
long |
readLong(long position) |
void |
resetChecksum() |
void |
setFileLength(long fileLength) |
void |
setFileName(java.lang.String fileName) |
void |
setLastModified(long lastModified) |
static void |
setMaxIndexBlocks(int blocks) |
static void |
storeBlock(MongoBlock mongoBlock) |
java.lang.String |
toString() |
void |
write(long position,
byte b) |
void |
write(long position,
byte[] b,
int offset,
int length) |
protected final short indexNumber
protected final short fileNumber
protected MongoFile(MongoDirectory mongoDirectory, java.lang.String fileName, short fileNumber, int blockSize)
public static void clearCache()
public static long getCacheSize()
public static void setMaxIndexBlocks(int blocks)
public java.lang.String getFileName()
getFileName in interface NosqlFilepublic void setFileName(java.lang.String fileName)
setFileName in interface NosqlFilepublic long getFileLength()
getFileLength in interface NosqlFilepublic void setFileLength(long fileLength)
setFileLength in interface NosqlFilepublic long getLastModified()
getLastModified in interface NosqlFilepublic void setLastModified(long lastModified)
setLastModified in interface NosqlFilepublic byte readByte(long position)
throws java.io.IOException
public void readBytes(long position,
byte[] b,
int offset,
int length)
throws java.io.IOException
public void write(long position,
byte b)
throws java.io.IOException
public void write(long position,
byte[] b,
int offset,
int length)
throws java.io.IOException
public void flush()
throws java.io.IOException
public static void storeBlock(MongoBlock mongoBlock)
public short getFileNumber()
getFileNumber in interface NosqlFilepublic int getBlockSize()
getBlockSize in interface NosqlFilepublic long getChecksum()
getChecksum in interface NosqlFilepublic void resetChecksum()
resetChecksum in interface NosqlFilepublic java.lang.String toString()
toString in class java.lang.Objectpublic int readInt(long position)
throws java.io.IOException