|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.journal.AbstractJournal
com.bigdata.resources.StoreManager.ManagedJournal
public class StoreManager.ManagedJournal
The StoreManager.ManagedJournal provides the backing store used to absorb
writes and retain history for the scale-out architecture.
Note: This implementation is designed to use a shared
ConcurrencyManager across all open journal instances for a
DataService.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.bigdata.journal.AbstractJournal |
|---|
AbstractJournal.BasicHA |
| Field Summary |
|---|
| Fields inherited from class com.bigdata.journal.AbstractJournal |
|---|
DELETEBLOCK, deleteOnClose, doubleSync, forceOnCommit, PREV_ROOTBLOCK, properties, ROOT_ICUVERSION, ROOT_NAME2ADDR, tmpDir |
| Fields inherited from interface com.bigdata.rawstore.IAddressManager |
|---|
NULL |
| Constructor Summary | |
|---|---|
protected |
StoreManager.ManagedJournal(Properties properties)
|
| Method Summary | |
|---|---|
ScheduledFuture<?> |
addScheduledTask(Runnable task,
long initialDelay,
long delay,
TimeUnit unit)
Adds a task which will run until canceled, until it throws an exception, or until the service is shutdown. |
long |
commitNow(long commitTime)
Note: Exposed for the DataService which needs this for its
2-phase commit protocol. |
boolean |
getCollectPlatformStatistics()
true iff performance counters will be collected for the
platform on which the client is running. |
boolean |
getCollectQueueStatistics()
true iff statistics will be collected for work queues. |
CommitRecordIndex |
getCommitRecordIndex(long addr)
Exposed for StoreManger#getResourcesForTimestamp(long) which
requires access to the CommitRecordIndex for the
lastCommitTime on the historical journals. |
ExecutorService |
getExecutorService()
Service for running arbitrary tasks in support of IResourceLocator. |
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. |
int |
getHttpdPort()
The port on which the optional httpd service will be run. |
AbstractLocalTransactionManager |
getLocalTransactionManager()
Return the object providing the local transaction manager for this journal. |
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()
A factory for TemporaryStores. |
String |
toString()
|
protected void |
validateIndexMetadata(String name,
IndexMetadata metadata)
Extended to set the IResourceMetadata to this journal if it
is null since a remote caller can not have the correct
metadata on hand when they formulate the request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected StoreManager.ManagedJournal(Properties properties)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic long commitNow(long commitTime)
DataService which needs this for its
2-phase commit protocol.
commitNow in class AbstractJournalcommitTime - The commit time either of a transaction or of an unisolated
commit. Note that when mixing isolated and unisolated commits
you MUST use the same ITimestampService for both
purposes.
public CommitRecordIndex getCommitRecordIndex(long addr)
StoreManger#getResourcesForTimestamp(long) which
requires access to the CommitRecordIndex for the
lastCommitTime on the historical journals.
Note: This always returns a distinct index object. The code relies on
this fact to avoid contention with the live CommitRecordIndex
for the live journal.
getCommitRecordIndex in class AbstractJournaladdr - The root address of the index -or- 0L if the index has not
been created yet.
CommitRecordIndex for that address or a new index if
0L was specified as the address.AbstractJournal._commitRecordIndexpublic AbstractLocalTransactionManager getLocalTransactionManager()
IJournal
public SparseRowStore getGlobalRowStore()
IIndexStoreSparseRowStore used to
store named property sets.
GlobalRowStoreSchemapublic 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.
timestamp - The timestamp of the view.
null if no view
exists as of that timestamp.public BigdataFileSystem getGlobalFileSystem()
IIndexStore
BigdataFileSystempublic DefaultResourceLocator getResourceLocator()
IIndexStore
public ExecutorService getExecutorService()
AbstractJournalIResourceLocator. There is no concurrency control associated with
this service, but tasks run here may submit tasks to the
ConcurrencyManager.
getExecutorService in interface IIndexStoregetExecutorService in class AbstractJournalpublic IResourceLockService getResourceLockService()
IIndexStore
public TemporaryStore getTempStore()
IIndexStoreTemporaryStores. TemporaryStores are
thread-safe and may be used by multiple processes at once. Old
TemporaryStores are eventually retired by the factory and their
storage is reclaimed once they are finalized (after they are no longer in
use by any process). The decision to retire a TemporaryStore is
either made implicitly, when it is no longer weakly reachable, or
explicitly, when it has grown large enough that no new processes should
begin using that TemporaryStore. In the latter case, the
TemporaryStore will remain available to the process(es) using it
and a new TemporaryStore will be allocated and made available to
the caller.
It is important that processes do not hold a hard reference to a
TemporaryStore beyond the end of the process as that will prevent
the TemporaryStore from being finalized. Holding reference to an
AbstractBTree created on a TemporaryStore is equivalent
to holding a hard reference to the TemporaryStore itself since
the AbstractBTree holds onto the backing IRawStore using
a hard reference.
TemporaryStore.
protected void validateIndexMetadata(String name,
IndexMetadata metadata)
IResourceMetadata to this journal if it
is null since a remote caller can not have the correct
metadata on hand when they formulate the request.
validateIndexMetadata in class AbstractJournal
public ScheduledFuture<?> addScheduledTask(Runnable task,
long initialDelay,
long delay,
TimeUnit unit)
IIndexStore
task - 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()
IIndexStoretrue iff performance counters will be collected for the
platform on which the client is running.
public boolean getCollectQueueStatistics()
IIndexStoretrue iff statistics will be collected for work queues.
public int getHttpdPort()
IIndexStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||