Public Types | |
typedef Object | function (IReader reader) SimpleProxyFnc |
typedef Object | function (IReader reader, char[] guid) GuidProxyFnc |
Static Public Member Functions | |
void | enroll (IPickleFactory object) |
void | enroll (SimpleProxyFnc sp, char[] guid) |
void | enroll (GuidProxyFnc gp, char[] guid) |
Object | create (IReader reader, char[] guid) |
Private Member Functions | |
this () | |
Static Private Member Functions | |
this () | |
synchronized void | enroll (Proxy proxy, char[] guid) |
final synchronized Proxy | lookup (char[] guid) |
Static Private Attributes | |
Object | lock |
Proxy[char[]] | registry |
Each IPickle exposes the means to write, or freeze, its content. An IPickleFactory provides the means to create a new instance of itself populated with thawed data. Frozen objects are uniquely identified by a guid exposed via the interface. Responsibility of maintaining uniqueness across said identifiers lies in the hands of the developer.
See PickleReader for an example of how this is expected to operate.
Definition at line 59 of file PickleRegistry.d.
|
Definition at line 68 of file PickleRegistry.d. |
|
Definition at line 69 of file PickleRegistry.d. |
|
This is a singleton: the constructor should not be exposed Definition at line 177 of file PickleRegistry.d. |
|
Initialize the environment Definition at line 187 of file PickleRegistry.d. References lock. |
|
Add the provided class to the registry. Note that one cannot change a registration once it is placed. Neither can one remove registered item. This is done to avoid major issues when trying to synchronize servers across a farm, which may still have live instances of "old" objects waiting to be passed around the cluster. New versions of an object should be given a distinct guid from the prior version; appending an incremental number may well be sufficient for your needs. Definition at line 207 of file PickleRegistry.d. References registry. Referenced by enroll(). |
|
do a synchronized Proxy lookup of the guid Definition at line 221 of file PickleRegistry.d. References registry. Referenced by create(). |
|
Add the provided object to the registry. Note that one cannot change a registration once it is placed. Neither can one remove registered item. This is done to avoid major issues when trying to synchronize servers across a farm, which may still have live instances of "old" objects waiting to be passed around the cluster. New versions of an object should be given a distinct guid from the prior version; appending an incremental number may well be sufficient for your needs. Definition at line 242 of file PickleRegistry.d. References enroll(). |
|
Add the provided function to the registry. Note that one cannot change a registration once it is placed. Neither can one remove registered item. This is done to avoid major issues when trying to synchronize servers across a farm, which may still have live instances of "old" objects waiting to be passed around the cluster. New versions of an object should be given a distinct guid from the prior version; appending an incremental number may well be sufficient for your needs. Definition at line 261 of file PickleRegistry.d. References enroll(). |
|
Add the provided function to the registry. Note that one cannot change a registration once it is placed. Neither can one remove registered item. This is done to avoid major issues when trying to synchronize servers across a farm, which may still have live instances of "old" objects waiting to be passed around the cluster. New versions of an object should be given a distinct guid from the prior version; appending an incremental number may well be sufficient for your needs. Definition at line 280 of file PickleRegistry.d. References enroll(). |
|
Create a new instance of a registered class from the content made available via the given reader. The factory is located using the provided guid, which must match an enrolled class. Note that only the factory lookup is synchronized, and not the instance construction itself. Definition at line 296 of file PickleRegistry.d. References PickleRegistry::Proxy::create(), and lookup(). |
|
Definition at line 61 of file PickleRegistry.d. Referenced by this(). |
|
Definition at line 62 of file PickleRegistry.d. |