public interface IStore extends IAllocationManager, IStreamStore, IHistoryManager
IStore
interface provides persistent storage abstraction for
fixed size allocations and allocation recycling.Modifier and Type | Method and Description |
---|---|
long |
alloc(byte[] buf,
int size,
IAllocationContext context)
Writes data on the store.
|
void |
close()
Close the backing storage.
|
void |
commit()
Global commit on the backing store.
|
void |
free(long addr,
int size)
Frees allocated storage (clears the bit to enable recycling after
the next commit).
|
int |
getAssociatedSlotSize(int addr) |
Lock |
getCommitLock()
Optionally return a
Lock that must be used (when non-
null ) to make the commit() / postCommit()
strategy atomic. |
void |
getData(long addr,
byte[] buf)
Read data of a known size from the store.
|
File |
getStoreFile()
Retrieves store file.
|
void |
postCommit()
Hook that supports synchronization with an external commit before which
a rollback to "pre-commit" state is supported.
|
abortContext, detachContext, newAllocationContext
getInputStream, getOutputStream
checkDeferredFrees, getLastReleaseTime, newTx, registerExternalCache, saveDeferrals
long alloc(byte[] buf, int size, IAllocationContext context)
void free(long addr, int size)
addr
- the storage address to be freedLock getCommitLock()
Lock
that must be used (when non-
null
) to make the commit()
/ postCommit()
strategy atomic.void commit()
free(long, int)
is now available for recycling.
However, recycling can not occur if session protection is active.void postCommit()
void getData(long addr, byte[] buf)
addr
- the address of the databuf
- the buffer of the size required!int getAssociatedSlotSize(int addr)
addr
- - the addressvoid close()
File getStoreFile()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.