| java.lang.Object org.clapper.curn.DataPersister
All known Subclasses: org.clapper.curn.XMLDataPersister,
DataPersister | abstract public class DataPersister (Code) | | Persists data to the curn persistent data store, whatever that may
be.
version: $Revision: 6498 $ |
Inner Class :public interface LoadedDataHandler | |
Method Summary | |
final public void | addPersistentDataClient(PersistentDataClient client) Register a
PersistentDataClient object with this registry.
When data for that client is read, this object will call the
client's process methods. | abstract protected void | doLoad(LoadedDataHandler loadedDataHandler) The actual load method; only called if the object is enabled. | abstract protected void | endLoadOperation() Called at the end of the load operation to close files, clean
up, etc. | abstract protected void | endSaveOperation() Called at the end of the actual save operation to flush files, clean
up, etc. | abstract public void | init(CurnConfig curnConfig) Called when the DataPersister is first instantiated. | abstract protected boolean | isEnabled() Determine whether the data persister subclass is enabled or not (i.e.,
whether or not metadata is to be loaded and saved). | public void | loadData(FeedCache feedCache) Load the cache and metadata. | final public void | saveData(FeedCache feedCache) Save the feed metadata. | abstract protected void | saveExtraMetadata(Collection<PersistentMetadataGroup> metadata) Save any extra metadata (i.e., metadata that isn't attached to a
specific feed or a specific item). | abstract protected void | saveFeedData(PersistentFeedData feedData) Save the data for one feed, including the items. | abstract protected void | startLoadOperation() Called at the beginning of the load operation to initialize
the load. | abstract protected void | startSaveOperation() Called at the beginning of the actual save operation to initialize
the save, etc. |
DataPersister | protected DataPersister()(Code) | | |
addPersistentDataClient | final public void addPersistentDataClient(PersistentDataClient client)(Code) | | Register a
PersistentDataClient object with this registry.
When data for that client is read, this object will call the
client's process methods. When it's time to save the metadata,
this object will call the client's get methods. Multiple
PersistentDataClient objects may be registered with this object.
Parameters: client - the PersistentDataClient object |
doLoad | abstract protected void doLoad(LoadedDataHandler loadedDataHandler) throws CurnException(Code) | | The actual load method; only called if the object is enabled.
Parameters: loadedDataHandler - object to receive data as it's loaded throws: CurnException - on error |
endLoadOperation | abstract protected void endLoadOperation() throws CurnException(Code) | | Called at the end of the load operation to close files, clean
up, etc.
throws: CurnException - on error |
endSaveOperation | abstract protected void endSaveOperation() throws CurnException(Code) | | Called at the end of the actual save operation to flush files, clean
up, etc.
throws: CurnException - on error |
init | abstract public void init(CurnConfig curnConfig) throws CurnException(Code) | | Called when the DataPersister is first instantiated. Useful
for retrieving configuration values, etc.
Parameters: curnConfig - the configuration throws: CurnException - on error |
isEnabled | abstract protected boolean isEnabled()(Code) | | Determine whether the data persister subclass is enabled or not (i.e.,
whether or not metadata is to be loaded and saved). The configuration
usually determines whether or not the data persister is enabled.
true if enabled, false if disabled. |
saveData | final public void saveData(FeedCache feedCache) throws CurnException(Code) | | Save the feed metadata. The configuration is passed in, so that
the persister can obtain, from the configuration, whatever
data it needs to find the persisted metadata to read.
Parameters: feedCache - FeedCache object to save throws: CurnException - on error |
startLoadOperation | abstract protected void startLoadOperation() throws CurnException(Code) | | Called at the beginning of the load operation to initialize
the load.
throws: CurnException - on error |
startSaveOperation | abstract protected void startSaveOperation() throws CurnException(Code) | | Called at the beginning of the actual save operation to initialize
the save, etc.
throws: CurnException - on error |
|
|