public abstract class AbstractSharedCachingDataStore extends AbstractDataStore implements MultiDataStoreAware, SharedDataStore, TypedDataStore
<DataStore class="org.apache.jackrabbit.oak.plugins.blob.AbstractCachingDataStore">
<param name="path"/>
<param name="cacheSize" value="68719476736"/>
<param name="stagingSplitPercentage" value="10"/>
<param name="uploadThreads" value="10"/>
<param name="stagingPurgeInterval" value="300"/>
<param name="stagingRetryInterval " value="600"/>
</DataStore>
SharedDataStore.Type| Modifier and Type | Field and Description |
|---|---|
protected org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend |
backend
The delegate backend
|
protected ExecutorService |
executor |
protected com.google.common.util.concurrent.ListeningExecutorService |
listeningExecutor |
protected ScheduledExecutorService |
schedulerExecutor |
DIGEST| Constructor and Description |
|---|
AbstractSharedCachingDataStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMetadataRecord(File f,
String name)
Adds the root record.
|
void |
addMetadataRecord(InputStream stream,
String name)
------------------------ SharedDataStore methods -----------------------------------------
|
DataRecord |
addRecord(InputStream inputStream) |
DataRecord |
addRecord(InputStream inputStream,
org.apache.jackrabbit.oak.spi.blob.BlobOptions blobOptions)
Add a record with specified options.
|
void |
clearInUse()
------------------------ unimplemented methods -------------------------------------------
|
void |
close() |
protected abstract org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend |
createBackend() |
void |
deleteAllMetadataRecords(String prefix)
Deletes all records matching the given prefix.
|
int |
deleteAllOlderThan(long l) |
boolean |
deleteMetadataRecord(String name)
Deletes the root record represented by the given parameters.
|
void |
deleteRecord(DataIdentifier dataIdentifier) |
boolean |
exists(DataIdentifier identifier)
Look in the backend for a record matching the given identifier.
|
Iterator<DataIdentifier> |
getAllIdentifiers()
In rare cases may include some duplicates in cases where async staged uploads complete
during iteration.
|
List<DataRecord> |
getAllMetadataRecords(String prefix)
Gets the all root records.
|
Iterator<DataRecord> |
getAllRecords()
Retrieved an iterator over all DataRecords.
|
protected CompositeDataStoreCache |
getCache() |
DataRecord |
getMetadataRecord(String name)
Retrieves the metadata record with the given name
|
protected byte[] |
getOrCreateReferenceKey() |
DataRecord |
getRecord(DataIdentifier identifier) |
DataRecord |
getRecordForId(DataIdentifier identifier)
Retrieves the record for the given identifier
|
DataRecord |
getRecordIfStored(DataIdentifier dataIdentifier) |
List<DataStoreCacheStatsMBean> |
getStats() |
SharedDataStore.Type |
getType()
Gets the type.
|
void |
init(String homeDir) |
void |
setCacheSize(long cacheSize) |
void |
setPath(String path)
------------------------- setters ----------------------------------------------
|
void |
setStagingPurgeInterval(int stagingPurgeInterval) |
void |
setStagingRetryInterval(int stagingRetryInterval) |
void |
setStagingSplitPercentage(int stagingSplitPercentage) |
void |
setStatisticsProvider(org.apache.jackrabbit.oak.stats.StatisticsProvider statisticsProvider) |
void |
setUploadThreads(int uploadThreads) |
void |
updateModifiedDateOnAccess(long l) |
encodeHexString, getRecordFromReference, getReferenceFromIdentifierclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMinRecordLengthprotected org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend backend
protected com.google.common.util.concurrent.ListeningExecutorService listeningExecutor
protected ScheduledExecutorService schedulerExecutor
protected ExecutorService executor
public void init(String homeDir) throws DataStoreException
init in interface DataStoreDataStoreExceptionprotected abstract org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend createBackend()
public DataRecord getRecord(DataIdentifier identifier) throws DataStoreException
getRecord in interface DataStoregetRecord in class AbstractDataStoreDataStoreException@Nullable public DataRecord getRecordIfStored(DataIdentifier dataIdentifier) throws DataStoreException
getRecordIfStored in interface DataStoreDataStoreExceptionpublic DataRecord addRecord(InputStream inputStream) throws DataStoreException
addRecord in interface DataStoreDataStoreExceptionpublic DataRecord addRecord(InputStream inputStream, org.apache.jackrabbit.oak.spi.blob.BlobOptions blobOptions) throws DataStoreException
TypedDataStoreaddRecord in interface TypedDataStoreDataStoreExceptionpublic Iterator<DataIdentifier> getAllIdentifiers() throws DataStoreException
getAllIdentifiers in interface DataStoreDataStoreExceptionpublic void deleteRecord(DataIdentifier dataIdentifier) throws DataStoreException
deleteRecord in interface MultiDataStoreAwareDataStoreExceptionpublic void close()
throws DataStoreException
close in interface DataStoreDataStoreExceptionpublic boolean exists(DataIdentifier identifier)
identifier - - An identifier for the record.public List<DataStoreCacheStatsMBean> getStats()
protected CompositeDataStoreCache getCache()
public void setPath(String path)
public void setCacheSize(long cacheSize)
public void setStagingSplitPercentage(int stagingSplitPercentage)
public void setUploadThreads(int uploadThreads)
public void setStagingPurgeInterval(int stagingPurgeInterval)
public void setStagingRetryInterval(int stagingRetryInterval)
public void setStatisticsProvider(org.apache.jackrabbit.oak.stats.StatisticsProvider statisticsProvider)
public void addMetadataRecord(InputStream stream, String name) throws DataStoreException
addMetadataRecord in interface SharedDataStorestream - the streamname - the name of the root recordDataStoreException - the data store exceptionpublic void addMetadataRecord(File f, String name) throws DataStoreException
SharedDataStoreaddMetadataRecord in interface SharedDataStoref - the filename - the name of the root recordDataStoreException - the data store exceptionpublic DataRecord getMetadataRecord(String name)
SharedDataStoregetMetadataRecord in interface SharedDataStorename - the name of the recordpublic List<DataRecord> getAllMetadataRecords(String prefix)
SharedDataStoregetAllMetadataRecords in interface SharedDataStorepublic boolean deleteMetadataRecord(String name)
SharedDataStoredeleteMetadataRecord in interface SharedDataStorename - the name of the root recordpublic void deleteAllMetadataRecords(String prefix)
SharedDataStoredeleteAllMetadataRecords in interface SharedDataStoreprefix - metadata type identifierpublic Iterator<DataRecord> getAllRecords() throws DataStoreException
SharedDataStoregetAllRecords in interface SharedDataStoreDataStoreExceptionpublic DataRecord getRecordForId(DataIdentifier identifier) throws DataStoreException
SharedDataStoregetRecordForId in interface SharedDataStoreidentifier - the if of the recordDataStoreExceptionpublic SharedDataStore.Type getType()
SharedDataStoregetType in interface SharedDataStoreprotected byte[] getOrCreateReferenceKey()
throws DataStoreException
getOrCreateReferenceKey in class AbstractDataStoreDataStoreExceptionpublic void clearInUse()
clearInUse in interface DataStorepublic void updateModifiedDateOnAccess(long l)
updateModifiedDateOnAccess in interface DataStorepublic int deleteAllOlderThan(long l)
throws DataStoreException
deleteAllOlderThan in interface DataStoreDataStoreExceptionCopyright © 2012–2017 The Apache Software Foundation. All rights reserved.