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