Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

PickleRegistry Class Reference

List of all members.

Public Types

typedef Object function (IReader reader) SimpleProxyFnc
typedef Object function (IReader reader, char[] guid) GuidProxyFnc

Static Public Member Functions

static void enroll (IPickleFactory object)
static void enroll (SimpleProxyFnc sp, char[] guid)
static void enroll (GuidProxyFnc gp, char[] guid)
static Object create (IReader reader, char[] guid)

Private Member Functions

 this ()

Static Private Member Functions

static synchronized void enroll (Proxy proxy, char[] guid)
static final synchronized
Proxy 
lookup (char[] guid)

Static Private Attributes

static Proxy[char[]] registry

Classes

class  GuidProxy
class  PickleProxy
class  Proxy
class  SimpleProxy

Detailed Description

Bare framework for registering and creating serializable objects. Such objects are intended to be transported across a local network and re-instantiated at some destination node.

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 62 of file PickleRegistry.d.


Member Typedef Documentation

typedef Object function(IReader reader) SimpleProxyFnc
 

Definition at line 70 of file PickleRegistry.d.

typedef Object function(IReader reader, char[] guid) GuidProxyFnc
 

Definition at line 71 of file PickleRegistry.d.


Member Function Documentation

this  )  [inline, private]
 

This is a singleton: the constructor should not be exposed

Definition at line 79 of file PickleRegistry.d.

static synchronized void enroll Proxy  proxy,
char[]  guid
[inline, static, private]
 

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 197 of file PickleRegistry.d.

References registry.

Referenced by enroll().

static final synchronized Proxy lookup char[]  guid  )  [inline, static, private]
 

do a synchronized Proxy lookup of the guid

Definition at line 211 of file PickleRegistry.d.

References registry.

Referenced by create().

static void enroll IPickleFactory  object  )  [inline, static]
 

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 233 of file PickleRegistry.d.

References enroll().

static void enroll SimpleProxyFnc  sp,
char[]  guid
[inline, static]
 

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 252 of file PickleRegistry.d.

References enroll().

static void enroll GuidProxyFnc  gp,
char[]  guid
[inline, static]
 

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 271 of file PickleRegistry.d.

References enroll().

static Object create IReader  reader,
char[]  guid
[inline, static]
 

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 287 of file PickleRegistry.d.

References PickleRegistry::Proxy::create(), and lookup().


Member Data Documentation

Proxy [char[]] registry [static, private]
 

Definition at line 64 of file PickleRegistry.d.

Referenced by enroll(), and lookup().


The documentation for this class was generated from the following file:
Generated on Fri Nov 11 18:44:40 2005 for Mango by  doxygen 1.4.0