| Package | org.openPyro.storage |
| Class | public class SharedObjectStorage |
| Inheritance | SharedObjectStorage flash.events.EventDispatcher |
| Implements | IStorage |
var ob:StorageDictionary = new StorageDictionary()
ob.setKeyValuePair(key, value);
var storage:SharedObjectStore = new SharedObjectStore('dev')
storage.save(ob)
| Property | Defined by | ||
|---|---|---|---|
| minDiskSpace : Number = 1000
The number of bytes to reserve for the storage
| SharedObjectStorage | ||
| storeActionState : String [read-only]
Returns the status of the last "save" action.
| SharedObjectStorage | ||
| storeCreated : Boolean [read-only]
Function used to verify if the store was successfully created or not.
| SharedObjectStorage | ||
| Property | Defined by | ||
|---|---|---|---|
| _storeActionState : String | SharedObjectStorage | ||
| Method | Defined by | ||
|---|---|---|---|
|
SharedObjectStorage(soName:String, localPath:String = null, secure:Boolean = false)
Constructor
| SharedObjectStorage | ||
|
getStoredData():String
| SharedObjectStorage | ||
|
save(ob:ISerializable, overwrite:Boolean = true):void
Called to save the contents of the store to tje storage implementation.
| SharedObjectStorage | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when the store fails in persisting any object to the store | SharedObjectStorage | |||
| Dispatched when the store succeeds in persisting any object to the store | SharedObjectStorage | |||
| minDiskSpace | property |
public var minDiskSpace:Number = 1000The number of bytes to reserve for the storage
| _storeActionState | property |
protected var _storeActionState:String
| storeActionState | property |
storeActionState:String [read-only]
Returns the status of the last "save" action.
The values are one of the constant values from
org.openPyro.core.storage.StoreActionState
public function get storeActionState():String
See also
| storeCreated | property |
storeCreated:Boolean [read-only]Function used to verify if the store was successfully created or not. For example, users may have sharedObject turned off or may not allow filesystem access or may be offline for remote storage.
Implementation public function get storeCreated():Boolean
| SharedObjectStorage | () | constructor |
public function SharedObjectStorage(soName:String, localPath:String = null, secure:Boolean = false)Constructor
ParameterssoName:String |
|
localPath:String (default = null) |
|
secure:Boolean (default = false) |
| getStoredData | () | method |
public function getStoredData():StringReturns
String — The string stored by the IStorage implementation.
If the store does not exist or could not be read, return
null.
|
| save | () | method |
public function save(ob:ISerializable, overwrite:Boolean = true):voidCalled to save the contents of the store to tje storage implementation. Since this may be an async process, success or failure is indicated by dispatching a storeSucceeded or storeFailed Event.
Parametersob:ISerializable |
|
overwrite:Boolean (default = true) |
| storageFailed | event |
net.comcast.pyro.storage.events.StorageEvent
Dispatched when the store fails in persisting any object to the store
| storeSucceeded | event |
net.comcast.pyro.storage.events.StorageEvent
Dispatched when the store succeeds in persisting any object to the store