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, writeBinIndex
public JournalledFileStore(String resource_name, LoggingBufferManager buffer_manager, boolean read_only)
public boolean delete() throws IOException
IOException
public boolean exists() throws IOException
IOException
public void lockForWrite()
Store
To 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()
Store
protected void internalOpen(boolean read_only) throws IOException
internalOpen
in class AbstractStore
IOException
protected void internalClose() throws IOException
internalClose
in class AbstractStore
IOException
protected int readByteFrom(long position) throws IOException
AbstractStore
readByteFrom
in class AbstractStore
IOException
protected int readByteArrayFrom(long position, byte[] buf, int off, int len) throws IOException
AbstractStore
readByteArrayFrom
in class AbstractStore
IOException
protected void writeByteTo(long position, int b) throws IOException
AbstractStore
writeByteTo
in class AbstractStore
IOException
protected void writeByteArrayTo(long position, byte[] buf, int off, int len) throws IOException
AbstractStore
writeByteArrayTo
in class AbstractStore
IOException
protected long endOfDataAreaPointer() throws IOException
AbstractStore
endOfDataAreaPointer
in class AbstractStore
IOException
protected void setDataAreaSize(long new_size) throws IOException
AbstractStore
setDataAreaSize
in class AbstractStore
IOException
Copyright © 2015. All rights reserved.