|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.faunos.skwish.SegmentStore
public abstract class SegmentStore
A managed union of segments on the file system exposed as a logical whole. This class provides transaction semantics and supports concurrent access to the logical whole segment.
Field Summary | |
---|---|
protected static Validator<SegmentStoreException> |
validator
|
Constructor Summary | |
---|---|
SegmentStore()
|
Method Summary | |
---|---|
abstract void |
close()
Closes the instance. |
static Provider |
getProvider()
Returns the current service provider. |
abstract Segment |
getReadOnlySegment()
Returns the live read-only view of the committed segments. |
abstract 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. |
abstract String |
getUri()
Returns the URI used to load this instance. |
static SegmentStore |
loadInstance(String uri)
Loads and returns an existing segment store from the specified URI. |
abstract TxnSegment |
newTransaction()
Returns a new transaction [segment]. |
static void |
setProvider(Provider provider)
Sets the service provider. |
static SegmentStore |
writeNewInstance(String uri)
Writes a new segment store to the specified URI and returns the instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.nio.channels.Channel |
---|
isOpen |
Field Detail |
---|
protected static final Validator<SegmentStoreException> validator
Constructor Detail |
---|
public SegmentStore()
Method Detail |
---|
public static void setProvider(Provider provider)
public static Provider getProvider()
public static SegmentStore loadInstance(String uri) throws IOException
IOException
public static SegmentStore writeNewInstance(String uri) throws IOException
IOException
public abstract String getUri()
public abstract Segment getReadOnlySegment() throws IOException
IOException
public abstract TxnSegment newTransaction() throws IOException
TxnSegment
s) are not individually
thread-safe, each transaction may be run concurrently in its own thread.
IOException
public abstract long getTxnCommitIdGap(long txnId) throws IOException, NotFoundException
txnId
- the transaction id (from TxnSegment.getTxnId())
NotFoundException
- If txnId does not specify a known transaction
IOException
public abstract void close() throws IOException
Segment
s opened by this
instance are implicitly closed, and any uncommitted TxnSegment
s
are discarded.
close
in interface Closeable
close
in interface Channel
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |