|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.rawstore.AbstractRawStore
com.bigdata.rawstore.AbstractRawWormStore
com.bigdata.journal.TemporaryRawStore
com.bigdata.journal.TemporaryStore
public class TemporaryStore
A temporary store that supports named indices but no concurrency controls.
If you want a temporary store that supports named indices and concurrency
controls then choose a Journal with BufferMode.Temporary.
This has the advantage of full concurrency support, group commit, and
low-latency startup (since the file is not created until the store attempts
to write through to the disk). However, TemporaryStore is lighter
weight precisely because it does not provide concurrency control.
| Field Summary |
|---|
| Fields inherited from class com.bigdata.rawstore.AbstractRawWormStore |
|---|
am |
| Fields inherited from interface com.bigdata.rawstore.IAddressManager |
|---|
NULL |
| Constructor Summary | |
|---|---|
TemporaryStore()
A TemporaryStore that can scale-up. |
|
TemporaryStore(int offsetBits)
A TemporaryStore provisioned with the specified offsetBits. |
|
TemporaryStore(int offsetBits,
File file)
A TemporaryStore provisioned with the specified offsetBits
and backed by the specified file. |
|
| Method Summary | |
|---|---|
ScheduledFuture<?> |
addScheduledTask(Runnable task,
long initialDelay,
long delay,
TimeUnit unit)
Not supported, returns null. |
void |
close()
Close the store and delete the associated file, if any. |
void |
dropIndex(String name)
Drops the named index. |
boolean |
getCollectPlatformStatistics()
Not supported, returns false. |
boolean |
getCollectQueueStatistics()
Not supported, returns false. |
ExecutorService |
getExecutorService()
A ExecutorService that may be used to parallelize operations. |
BigdataFileSystem |
getGlobalFileSystem()
Return the global file system used to store block-structured files and their metadata and as a source and sink for map/reduce processing. |
SparseRowStore |
getGlobalRowStore()
Return an unisolated view of the global SparseRowStore used to
store named property sets. |
SparseRowStore |
getGlobalRowStore(long timestamp)
Return a view of the global SparseRowStore used to store named
property sets as of the specified timestamp. |
HTree |
getHTree(String name)
Return an ITx.UNISOLATED view of the named index -or-
null if there is no registered index by that name. |
int |
getHttpdPort()
Not supported, returns false. |
BTree |
getIndex(String name)
Return an ITx.UNISOLATED view of the named index -or-
null if there is no registered index by that name. |
BTree |
getIndex(String name,
long timestamp)
Historical reads and transactions are not supported. |
long |
getLastCommitTime()
Always returns ZERO (0L) since you can not perform a commit on a TemporaryRawStore (it supports checkpoints but not commits). |
DefaultResourceLocator |
getResourceLocator()
Return the default locator for resources that are logical index containers (relations and relation containers). |
IResourceLockService |
getResourceLockService()
The service that may be used to acquire synchronous distributed locks without deadlock detection. |
TemporaryStore |
getTempStore()
Always returns this TemporaryStore. |
void |
register(String name,
ICheckpointProtocol ndx)
Register a named persistence capable data structure (core impl). |
ICheckpointProtocol |
register(String name,
IndexMetadata metadata)
Variant method creates and registered a named persistence capable data structure but does not assume that the data structure will be a BTree. |
void |
registerIndex(IndexMetadata metadata)
Register a named index. |
BTree |
registerIndex(String name,
BTree btree)
Register a named index. |
BTree |
registerIndex(String name,
IndexMetadata metadata)
Register a named index. |
| Methods inherited from class com.bigdata.journal.TemporaryRawStore |
|---|
assertOpen, delete, deleteResources, destroy, finalize, force, getBufferStrategy, getCounters, getFile, getMaxRecordSize, getResourceMetadata, getTempFile, getTempFile, getUUID, isFullyBuffered, isOpen, isReadOnly, isStable, read, size, toString, write |
| Methods inherited from class com.bigdata.rawstore.AbstractRawWormStore |
|---|
getAddressManager, getByteCount, getOffset, getOffsetBits, getPhysicalAddress, toAddr, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.bigdata.journal.IIndexStore |
|---|
destroy |
| Constructor Detail |
|---|
public TemporaryStore()
TemporaryStore that can scale-up. The backing file will be
created using the Java temporary file mechanism.
WormAddressManager.SCALE_UP_OFFSET_BITS,
TemporaryRawStore.getTempFile()public TemporaryStore(int offsetBits)
TemporaryStore provisioned with the specified offsetBits.
The backing file will be created using the Java temporary file mechanism.
offsetBits - This determines the capacity of the store file and the maximum
length of a record. The value is passed through to
WormAddressManager.WormAddressManager(int).
public TemporaryStore(int offsetBits,
File file)
TemporaryStore provisioned with the specified offsetBits
and backed by the specified file.
offsetBits - This determines the capacity of the store file and the maximum
length of a record. The value is passed through to
WormAddressManager.WormAddressManager(int).file - The backing file (may exist, but must be empty if it exists).| Method Detail |
|---|
public void registerIndex(IndexMetadata metadata)
IIndexManager
Note: The name property MUST be set on the IndexMetadata
and the index will be registered under that name.
registerIndex in interface IIndexManagermetadata - The metadata describing the index.
public BTree registerIndex(String name,
IndexMetadata metadata)
IBTreeManager
This variant allows you to register an index under a name other than the
value returned by IndexMetadata.getName().
Note: This variant is generally by the IMetadataService when it
needs to register a index partition of some scale-out index on a
IDataService. In this case the name is the name of the
index partition while the value reported by
IndexMetadata.getName() is the name of the scale-out index. In
nearly all other cases you can use IIndexManager.registerIndex(IndexMetadata)
instead. The same method signature is also declared by
IDataService.registerIndex(String, IndexMetadata) in order to
support registration of index partitions.
Note: Due to the method signature, this method CAN NOT be used to create
and register persistence capable data structures other than an
IIndex (aka B+Tree).
registerIndex in interface IBTreeManagername - The name that can be used to recover the index.metadata - The metadata describing the index.
IBTreeManager.getIndex(String).#register(String, IndexMetadata)
public ICheckpointProtocol register(String name,
IndexMetadata metadata)
BTree.
store - The backing store.metadata - The metadata that describes the data structure to be created.
Checkpoint.create(IRawStore, IndexMetadata)
public final BTree registerIndex(String name,
BTree btree)
IBTreeManager
registerIndex in interface IBTreeManagername - The name that can be used to recover the index.btree - The btree.
IBTreeManager.getIndex(String).
public final void register(String name,
ICheckpointProtocol ndx)
name - The name.ndx - The data structure.public void dropIndex(String name)
IIndexManagerNote: Whether or not and when index resources are reclaimed is dependent on the store. For example, an immortal store will retain all historical states for all indices. Likewise, a store that uses index partitions may be able to delete index segments immediately.
dropIndex in interface IIndexManagername - The name of the index to be dropped.public BTree getIndex(String name)
ITx.UNISOLATED view of the named index -or-
null if there is no registered index by that name.
getIndex in interface IBTreeManagername - The name of the index.
null iff there
is no index registered with that name.public HTree getHTree(String name)
ITx.UNISOLATED view of the named index -or-
null if there is no registered index by that name.
public BTree getIndex(String name,
long timestamp)
getIndex in interface IIndexStorename - timestamp -
null iff there is no index registered
with that name for that timestamp.
UnsupportedOperationException - unless the timestamp is ITx.UNISOLATED.public SparseRowStore getGlobalRowStore()
IIndexStoreSparseRowStore used to
store named property sets.
getGlobalRowStore in interface IIndexStoreGlobalRowStoreSchemapublic SparseRowStore getGlobalRowStore(long timestamp)
IIndexStoreSparseRowStore used to store named
property sets as of the specified timestamp.
The SparseRowStore only permits ITx.UNISOLATED writes, so
you MUST specify ITx.UNISOLATED as the timestamp if you intend to
write on the global row store!
You can request the most recent committed state of the global row store
by specifying ITx.READ_COMMITTED.
getGlobalRowStore in interface IIndexStoretimestamp - The timestamp of the view.
null if no view
exists as of that timestamp.public BigdataFileSystem getGlobalFileSystem()
IIndexStore
getGlobalFileSystem in interface IIndexStoreBigdataFileSystempublic DefaultResourceLocator getResourceLocator()
IIndexStore
getResourceLocator in interface IIndexStorepublic ExecutorService getExecutorService()
IIndexStoreExecutorService that may be used to parallelize operations.
This service is automatically used when materializing located resources.
While the service does not impose concurrency controls, tasks run on this
service may submit operations to a ConcurrencyManager.
getExecutorService in interface IIndexStorepublic final IResourceLockService getResourceLockService()
IIndexStore
getResourceLockService in interface IIndexStorepublic void close()
TemporaryRawStore
close in interface IRawStoreclose in class TemporaryRawStorepublic long getLastCommitTime()
TemporaryRawStore (it supports checkpoints but not commits).
getLastCommitTime in interface IIndexStoreIRootBlockView.getLastCommitTime()public TemporaryStore getTempStore()
TemporaryStore.
getTempStore in interface IIndexStoreTemporaryStore.
public ScheduledFuture<?> addScheduledTask(Runnable task,
long initialDelay,
long delay,
TimeUnit unit)
null.
addScheduledTask in interface IIndexStoretask - The task.initialDelay - The initial delay.delay - The delay between invocations.unit - The units for the delay parameters.
ScheduledFuture for that task.public boolean getCollectPlatformStatistics()
false.
getCollectPlatformStatistics in interface IIndexStorepublic boolean getCollectQueueStatistics()
false.
getCollectQueueStatistics in interface IIndexStorepublic int getHttpdPort()
false.
getHttpdPort in interface IIndexStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||