public class PersistableAttributeStore extends AttributeStore implements IPersistable
| Modifier and Type | Field and Description |
|---|---|
protected long |
lastModified
Last modified Timestamp
|
protected String |
name
Attribute store name
|
protected String |
path
Attribute store path (on local hard drive)
|
protected boolean |
persistent
Persistence flag
|
protected IPersistenceStore |
store
Store object that deals with save/load routines
|
protected String |
type
Attribute store type
|
attributesTRANSIENT_PREFIX| Constructor and Description |
|---|
PersistableAttributeStore(String type,
String name,
String path,
boolean persistent)
Creates persistable attribute store
|
| Modifier and Type | Method and Description |
|---|---|
void |
deserialize(Input input)
Deserializes data from input to attributes
|
Object |
getAttribute(String name,
Object defaultValue)
Return the value for a given attribute and set it if it doesn't exist.
|
long |
getLastModified()
Returns last modification time as timestamp
|
String |
getName()
Return store name
|
String |
getPath()
Ruturn scope path
|
IPersistenceStore |
getStore()
Return persistent store
|
String |
getType()
Return scope type
|
boolean |
isPersistent()
Check whether object is persistent or not
|
protected void |
modified()
Set last modified flag to current system time
|
boolean |
removeAttribute(String name)
Removes attribute
|
void |
removeAttributes()
Removes all attributes and sets modified flag
|
void |
serialize(Output output)
Serializes byte buffer output, storing them to attributes
|
boolean |
setAttribute(String name,
Object value)
Set attribute by name and return success as boolean
|
void |
setAttributes(IAttributeStore values)
Bulk set of attributes from another attributes store
|
void |
setAttributes(Map<String,Object> values)
Set attributes from Map
|
void |
setName(String name)
Setter for name
|
void |
setPath(String path)
Setter for scope path
|
void |
setPersistent(boolean persistent)
Set for persistence
|
void |
setStore(IPersistenceStore store)
Load data from another persistent store
|
filterNull, from, getAttribute, getAttributeNames, getAttributes, getBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttribute, hasAttributeprotected boolean persistent
protected String name
protected String type
protected String path
protected long lastModified
protected IPersistenceStore store
protected void modified()
public boolean isPersistent()
isPersistent in interface IPersistablepublic void setPersistent(boolean persistent)
setPersistent in interface IPersistablepersistent - Persistence flag valuepublic long getLastModified()
getLastModified in interface IPersistablepublic String getName()
getName in interface IPersistablepublic void setName(String name)
setName in interface IPersistablename - Namepublic String getPath()
getPath in interface IPersistablepublic void setPath(String path)
setPath in interface IPersistablepath - Pathpublic String getType()
getType in interface IPersistablepublic void serialize(Output output) throws IOException
serialize in interface IPersistableoutput - Output objectIOException - if errorpublic void deserialize(Input input) throws IOException
deserialize in interface IPersistableinput - Input objectIOException - I/O exceptionpublic void setStore(IPersistenceStore store)
setStore in interface IPersistablestore - Persistent storepublic IPersistenceStore getStore()
getStore in interface IPersistablepublic Object getAttribute(String name, Object defaultValue)
getAttribute in interface IAttributeStoregetAttribute in class AttributeStorename - the name of the attribute to getdefaultValue - the value of the attribute to set if the attribute doesn't
existpublic boolean setAttribute(String name, Object value)
setAttribute in interface IAttributeStoresetAttribute in class AttributeStorename - Attribute namevalue - Attribute valuepublic void setAttributes(Map<String,Object> values)
setAttributes in interface IAttributeStoresetAttributes in class AttributeStorevalues - Attributes as Mappublic void setAttributes(IAttributeStore values)
setAttributes in interface IAttributeStoresetAttributes in class AttributeStorevalues - Attributes storepublic boolean removeAttribute(String name)
removeAttribute in interface IAttributeStoreremoveAttribute in interface AttributeStoreMXBeanremoveAttribute in class AttributeStorename - Attribute namepublic void removeAttributes()
removeAttributes in interface IAttributeStoreremoveAttributes in interface AttributeStoreMXBeanremoveAttributes in class AttributeStoreCopyright © 2006-2012 The Red5 Project