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

Task Class Reference

Inheritance diagram for Task:

Message ITask List of all members.

Public Member Functions

void execute ()
Object create ()
char[] getGuid ()
void read (IReader reader)
void write (IWriter writer)
Object create (IReader reader)

Private Member Functions

void setReply (char[] channel)
char[] getReply ()
bool isReplyExpected ()
long getTime ()
void setTime (long time)
void destroy ()

Detailed Description

A cluster-based executable class. You should implement the various abstract methods, and optionally override the read() and write() methods to transport any non-transient content along with the task. Note that when using read() and write(), you should invoke the superclass first. That is, read() and write() should look something like this:

void read (IReader reader) { super.read (reader); reader.get (myAttribute1); reader.get (myAttribute2); reader.get (myAttribute3); } void write (IWriter writer) { super.write (writer); writer.put (myAttribute1); writer.put (myAttribute2); writer.put (myAttribute3); }

You should do it this way so that your Task can be deserialized as a superclass instance (if ever necessary).

Definition at line 251 of file Message.d.


Member Function Documentation

void execute  ) 
 

Reimplemented from ITask.

Object create  ) 
 

Overridable create method that simply instantiates a new instance. May be used to allocate subclassses from a freelist

Reimplemented from Message.

char [] getGuid  ) 
 

Return the guid for this payload. This should be unique per payload class, if said class is used in conjunction with the clustering facilities. Inspected by the Pickle utilitiy classes.

Reimplemented from Message.

void read IReader  reader  )  [inline]
 

Recover attributes from the provided reader

Reimplemented from Message.

Definition at line 286 of file Message.d.

void write IWriter  writer  )  [inline]
 

Emit attributes to the provided writer

Reimplemented from Message.

Definition at line 297 of file Message.d.

Object create IReader  reader  )  [inline]
 

Create a new instance of a payload, and populate it via read() using the specified reader

Reimplemented from Message.

Definition at line 309 of file Message.d.

void setReply char[]  channel  )  [inline, inherited]
 

Reimplemented from IMessage.

Definition at line 106 of file Message.d.

References Message::reply.

char [] getReply  )  [inline, inherited]
 

Reimplemented from IMessage.

Definition at line 115 of file Message.d.

References Message::reply.

bool isReplyExpected  )  [inline, inherited]
 

Definition at line 124 of file Message.d.

References Message::reply.

long getTime  )  [inherited]
 

Reimplemented in Payload.

Referenced by PlainCache::bind(), PlainCache::extract(), CacheServer::LoaderThread::load(), and NetworkCombo::put().

void setTime long  time  )  [inherited]
 

Reimplemented in Payload.

void destroy  )  [inherited]
 

Perform whatever cleanup is necessary. Could use ~this() instead, but I prefer it to be truly explicit.

Reimplemented in Payload, QueuedEntry, InvalidatorPayload, and ClusterEntry.

Referenced by CacheInvalidatee::notify().


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:11 2004 for Mango by doxygen 1.3.6