|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.red5.server.AttributeStore
org.red5.server.PersistableAttributeStore
public class PersistableAttributeStore
Persistable attributes store. Server-side SharedObjects feature based on this class.
| Field Summary | |
|---|---|
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 |
| Fields inherited from class org.red5.server.AttributeStore |
|---|
attributes |
| Fields inherited from interface org.red5.server.api.persistence.IPersistable |
|---|
TRANSIENT_PREFIX |
| Constructor Summary | |
|---|---|
PersistableAttributeStore(String type,
String name,
String path,
boolean persistent)
Creates persistable attribute store |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class org.red5.server.AttributeStore |
|---|
filterNull, getAttribute, getAttributeNames, getAttributes, getBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttribute, hasAttribute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean persistent
protected String name
protected String type
protected String path
protected long lastModified
protected IPersistenceStore store
| Constructor Detail |
|---|
public PersistableAttributeStore(String type,
String name,
String path,
boolean persistent)
type - Attribute store typename - Attribute store namepath - Attribute store pathpersistent - Whether store is persistent or not| Method Detail |
|---|
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 IPersistable
public void serialize(Output output)
throws IOException
serialize in interface IPersistableoutput - Output object
IOException - if error
public void deserialize(Input input)
throws IOException
deserialize in interface IPersistableinput - Input object
IOException - I/O exceptionpublic void setStore(IPersistenceStore store)
setStore in interface IPersistablestore - Persistent storepublic IPersistenceStore getStore()
getStore in interface IPersistable
public Object getAttribute(String name,
Object defaultValue)
getAttribute in interface AttributeStoreMBeangetAttribute 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
exist
public boolean setAttribute(String name,
Object value)
setAttribute in interface AttributeStoreMBeansetAttribute in interface IAttributeStoresetAttribute in class AttributeStorename - Attribute namevalue - Attribute value
public 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 AttributeStoreMBeanremoveAttribute in interface IAttributeStoreremoveAttribute in class AttributeStorename - Attribute name
public void removeAttributes()
removeAttributes in interface AttributeStoreMBeanremoveAttributes in interface IAttributeStoreremoveAttributes in class AttributeStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||