|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.faunos.skwish.SegmentStore com.faunos.skwish.sys.mgr.Store
public class Store
The SegmentStore
implementation.
Field Summary | |
---|---|
protected static ChannelUtil<SegmentStoreException> |
channelHelper
|
static Version |
VERSION
|
Fields inherited from class com.faunos.skwish.SegmentStore |
---|
validator |
Constructor Summary | |
---|---|
|
Store(File rootDir)
Reads the given root directory and creates a new instance. |
protected |
Store(File rootDir,
boolean create)
|
Method Summary | |
---|---|
void |
close()
Closes the instance. |
Version |
getFileVersion()
|
static Provider |
getProvider()
|
Segment |
getReadOnlySegment()
Returns the live read-only view of the committed segments. |
File |
getRootDirectory()
|
long |
getTxnCommitIdGap(long txnId)
Returns the transaction commit id gap recorded on commit for the specified transaction, or -1, if the transaction is pending or discarded. |
String |
getUri()
Returns the URI used to load this instance. |
boolean |
isOpen()
|
TxnSegment |
newTransaction()
Returns a new transaction [segment]. |
Methods inherited from class com.faunos.skwish.SegmentStore |
---|
loadInstance, setProvider, writeNewInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Version VERSION
protected static final ChannelUtil<SegmentStoreException> channelHelper
Constructor Detail |
---|
public Store(File rootDir) throws IOException
IOException
protected Store(File rootDir, boolean create) throws IOException
IOException
Method Detail |
---|
public static Provider getProvider()
public Version getFileVersion() throws IOException
IOException
public File getRootDirectory()
public String getUri()
SegmentStore
getUri
in class SegmentStore
public Segment getReadOnlySegment() throws IOException
SegmentStore
getReadOnlySegment
in class SegmentStore
IOException
public boolean isOpen()
public TxnSegment newTransaction() throws IOException
SegmentStore
TxnSegment
s) are not individually
thread-safe, each transaction may be run concurrently in its own thread.
newTransaction
in class SegmentStore
IOException
public long getTxnCommitIdGap(long txnId) throws IOException, NotFoundException
SegmentStore
getTxnCommitIdGap
in class SegmentStore
txnId
- the transaction id (from TxnSegment.getTxnId())
NotFoundException
- If txnId does not specify a known transaction
IOException
public void close() throws IOException
SegmentStore
Segment
s opened by this
instance are implicitly closed, and any uncommitted TxnSegment
s
are discarded.
close
in interface Closeable
close
in interface Channel
close
in class SegmentStore
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |