public class FilePersistence extends RamPersistence
objects, PERSISTENCE_NO_NAME, resources| Constructor and Description |
|---|
FilePersistence(IScope scope)
Create file persistence object for given scope
|
FilePersistence(org.springframework.core.io.support.ResourcePatternResolver resolver)
Create file persistence object from given resource pattern resolver
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkRemoveEmptyDirectories(String base)
Remove empty dirs
|
protected String |
getObjectPath(String id,
String name)
Get object path for given id and name
|
boolean |
load(IPersistable object)
Load state of an already instantiated persistent object.
|
IPersistable |
load(String name)
Load a persistent object with the given name.
|
void |
notifyClose()
Notify store that it's being closed.
|
boolean |
remove(IPersistable object)
Delete the passed persistent object.
|
boolean |
remove(String name)
Delete the persistent object with the given name.
|
boolean |
save(IPersistable object)
Persist given object.
|
protected boolean |
saveObject(IPersistable object)
Save persistable object
|
void |
setExtension(String extension)
Setter for extension.
|
void |
setPath(String path)
Setter for file path.
|
getObjectId, getObjectName, getObjectNames, getObjectspublic FilePersistence(org.springframework.core.io.support.ResourcePatternResolver resolver)
resolver - Resource pattern resolver and loaderpublic FilePersistence(IScope scope)
scope - Scopepublic void setPath(String path)
path - New pathpublic void setExtension(String extension)
extension - New extension.protected String getObjectPath(String id, String name)
getObjectPath in class RamPersistenceid - Object ID. The format of the object id is name - Object namepublic IPersistable load(String name)
load in interface IPersistenceStoreload in class RamPersistencename - the name of the object to loadnull if no such object was
foundpublic boolean load(IPersistable object)
load in interface IPersistenceStoreload in class RamPersistenceobject - the object to initializprotected boolean saveObject(IPersistable object)
object - Persistable objecttrue on success, false otherwisepublic boolean save(IPersistable object)
save in interface IPersistenceStoresave in class RamPersistenceobject - Object to storetrue on success, false otherwiseprotected void checkRemoveEmptyDirectories(String base)
base - Base directorypublic boolean remove(String name)
remove in interface IPersistenceStoreremove in class RamPersistencename - the name of the object to deletetrue if object was persisted and thus can be removed, false otherwisepublic boolean remove(IPersistable object)
remove in interface IPersistenceStoreremove in class RamPersistenceobject - the object to deletetrue if object was persisted and thus can be removed, false otherwisepublic void notifyClose()
notifyClose in interface IPersistenceStorenotifyClose in class RamPersistenceCopyright © 2006-2012 The Red5 Project