public 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 and Description |
|---|
JournalledFileStore(String resource_name,
LoggingBufferManager buffer_manager,
boolean read_only)
Constructs the ScatteringFileStore.
|
| Modifier and Type | Method and 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.
|
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(String resource_name, LoggingBufferManager buffer_manager, boolean read_only)
public boolean delete()
throws IOException
IOExceptionpublic boolean exists()
throws IOException
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 IOException
internalOpen in class AbstractStoreIOExceptionprotected void internalClose()
throws IOException
internalClose in class AbstractStoreIOExceptionprotected int readByteFrom(long position)
throws IOException
AbstractStorereadByteFrom in class AbstractStoreIOExceptionprotected int readByteArrayFrom(long position,
byte[] buf,
int off,
int len)
throws IOException
AbstractStorereadByteArrayFrom in class AbstractStoreIOExceptionprotected void writeByteTo(long position,
int b)
throws IOException
AbstractStorewriteByteTo in class AbstractStoreIOExceptionprotected void writeByteArrayTo(long position,
byte[] buf,
int off,
int len)
throws IOException
AbstractStorewriteByteArrayTo in class AbstractStoreIOExceptionprotected long endOfDataAreaPointer()
throws IOException
AbstractStoreendOfDataAreaPointer in class AbstractStoreIOExceptionprotected void setDataAreaSize(long new_size)
throws IOException
AbstractStoresetDataAreaSize in class AbstractStoreIOExceptionCopyright © 2019. All rights reserved.