Package org.apache.jackrabbit.core.data
Class AbstractDataStore
- java.lang.Object
-
- org.apache.jackrabbit.core.data.AbstractDataStore
-
- All Implemented Interfaces:
DataStore
- Direct Known Subclasses:
AbstractSharedCachingDataStore
,CachingDataStore
,DbDataStore
,FileDataStore
public abstract class AbstractDataStore extends java.lang.Object implements DataStore
-
-
Constructor Summary
Constructors Constructor Description AbstractDataStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataRecord
getRecord(DataIdentifier identifier)
Returns the identified data record.DataRecord
getRecordFromReference(java.lang.String reference)
Returns the record that matches the given binary reference.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.core.data.DataStore
addRecord, clearInUse, close, deleteAllOlderThan, getAllIdentifiers, getMinRecordLength, getRecordIfStored, init, updateModifiedDateOnAccess
-
-
-
-
Method Detail
-
getRecord
public DataRecord getRecord(DataIdentifier identifier) throws DataStoreException
Description copied from interface:DataStore
Returns the identified data record. The given identifier should be the identifier of a previously saved data record. Since records are never removed, there should never be cases where the identified record is not found. Abnormal cases like that are treated as errors and handled by throwing an exception.- Specified by:
getRecord
in interfaceDataStore
- Parameters:
identifier
- data identifier- Returns:
- identified data record
- Throws:
DataStoreException
- if the data store could not be accessed, or if the given identifier is invalid
-
getRecordFromReference
public DataRecord getRecordFromReference(java.lang.String reference) throws DataStoreException
Description copied from interface:DataStore
Returns the record that matches the given binary reference. Returnsnull
if the reference is invalid, for example if it points to a record that does not exist.- Specified by:
getRecordFromReference
in interfaceDataStore
- Parameters:
reference
- binary reference- Returns:
- matching record, or
null
- Throws:
DataStoreException
- if the data store could not be accessed
-
-