Storepublic final class JournalledFileStore extends AbstractStore
Note that access to the resources is abstracted via a 'resource_name' string. The LoggingBufferManager object converts the resource name into a concrete object that accesses the actual data.
BIN_AREA_OFFSET, BIN_ENTRIES, DATA_AREA_OFFSET, FIXED_AREA_OFFSET, free_bin_list, header_buf, MAGIC, read_only, total_allocated_space, wilderness_pointer| Constructor | Description |
|---|---|
JournalledFileStore(java.lang.String resource_name,
LoggingBufferManager buffer_manager,
boolean read_only) |
Constructs the ScatteringFileStore.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
delete() |
Deletes this store from the file system.
|
protected long |
endOfDataAreaPointer() |
Returns a pointer to the end of the current data area.
|
boolean |
exists() |
Returns true if this store exists in the file system.
|
protected void |
internalClose() |
Internally closes the backing area.
|
protected void |
internalOpen(boolean read_only) |
Internally opens the backing area.
|
void |
lockForWrite() |
It is often useful to guarentee that a certain sequence of updates to a
store is completed and not broken in the middle.
|
protected int |
readByteArrayFrom(long position,
byte[] buf,
int off,
int len) |
Reads a byte array from the given position in the file.
|
protected int |
readByteFrom(long position) |
Reads a byte from the given position in the file.
|
protected void |
setDataAreaSize(long new_size) |
Sets the size of the data area.
|
java.lang.String |
toString() |
|
void |
unlockForWrite() |
See the 'lockForWrite' method description.
|
protected void |
writeByteArrayTo(long position,
byte[] buf,
int off,
int len) |
Writes a byte array to the given position in the file.
|
protected void |
writeByteTo(long position,
int b) |
Writes a byte to the given position in the file.
|
checkPointer, close, coalescArea, createArea, deleteArea, expandDataArea, findAllocatedAreasNotIn, getAllAreas, getArea, getAreaHeader, getAreaInputStream, getMutableArea, getNextAreaHeader, getPreviousAreaHeader, isValidBoundarySize, lastCloseClean, open, openScanAndFix, readBins, reboundArea, splitArea, statsScan, totalAllocatedSinceStart, writeAllBins, writeBinIndexpublic JournalledFileStore(java.lang.String resource_name,
LoggingBufferManager buffer_manager,
boolean read_only)
public boolean delete()
throws java.io.IOException
java.io.IOExceptionpublic boolean exists()
throws java.io.IOException
java.io.IOExceptionpublic void lockForWrite()
StoreTo achieve this, the 'lockForWrite' and 'unlockForWrite' methods are available. When 'lockForWrite' has been called, a check point can not created until there are no write locks obtained on the table.
public void unlockForWrite()
Storeprotected void internalOpen(boolean read_only)
throws java.io.IOException
internalOpen in class AbstractStorejava.io.IOExceptionprotected void internalClose()
throws java.io.IOException
internalClose in class AbstractStorejava.io.IOExceptionprotected int readByteFrom(long position)
throws java.io.IOException
AbstractStorereadByteFrom in class AbstractStorejava.io.IOExceptionprotected int readByteArrayFrom(long position,
byte[] buf,
int off,
int len)
throws java.io.IOException
AbstractStorereadByteArrayFrom in class AbstractStorejava.io.IOExceptionprotected void writeByteTo(long position,
int b)
throws java.io.IOException
AbstractStorewriteByteTo in class AbstractStorejava.io.IOExceptionprotected void writeByteArrayTo(long position,
byte[] buf,
int off,
int len)
throws java.io.IOException
AbstractStorewriteByteArrayTo in class AbstractStorejava.io.IOExceptionprotected long endOfDataAreaPointer()
throws java.io.IOException
AbstractStoreendOfDataAreaPointer in class AbstractStorejava.io.IOExceptionprotected void setDataAreaSize(long new_size)
throws java.io.IOException
AbstractStoresetDataAreaSize in class AbstractStorejava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All rights reserved.