PLActorKit Class Reference

Provides support for spawning new actors and receiving actor messages. More...

List of all members.

Static Public Member Functions

(id< PLActorProcess >) + spawnWithTarget:selector:
 Spawn a new actor process.
(id) + receive
 Receive a message.
(BOOL) + receive:withTimeout:
 Receive a message with the given timeout.
(BOOL) + receive:usingFilter:filterContext:withTimeout:
 Perform a selective receive, using the provided filter function to select the first matching queued message.
(PLActorTxId+ createTransactionId
 Generate a unique transaction ID; the ID will be unique within the current actor process.
(id< PLActorProcess >) + process
 Return your process id.


Detailed Description

Provides support for spawning new actors and receiving actor messages.

Member Function Documentation

+ (id< PLActorProcess >) spawnWithTarget: (id)  target
selector: (SEL)  selector 

Spawn a new actor process.

Parameters:
target The object to which the message specified by selector is sent.
selector The message to send to target. This selector must accept no arguments.

+ (BOOL) receive: (id *)  message
withTimeout: (PLActorTimeInterval timeout 

Receive a message with the given timeout.

Parameters:
message Received message will be stored in the provided pointer, or set to nil if timeout is was reached.
timeout Number of milliseconds to wait. If 0, will return immediately. If -1, will wait forever.
Returns:
Returns YES if a message was received, NO if timeout was reached and no message was received.

+ (BOOL) receive: (id *)  message
usingFilter: (plactor_receive_filter_t filter
filterContext: (void *)  filterContext
withTimeout: (PLActorTimeInterval timeout 

Perform a selective receive, using the provided filter function to select the first matching queued message.

Parameters:
message Received message will be stored in the provided pointer, or set to nil if timeout is was reached.
filter Message filter function.
filterContext Message filter context.
timeout Number of milliseconds to wait. If 0, will return immediately. If -1, will wait forever.
Returns:
Returns YES if a message was received, NO if timeout was reached and no message was received.

+ (PLActorTxId) createTransactionId  

Generate a unique transaction ID; the ID will be unique within the current actor process.

The TXID may be used to differentiate messages, such as RPC requests.

Note:
The generator will roll-over after 2^32-1 IDs are generated.

+ (id< PLActorProcess >) process  

Return your process id.

Every actor in the system, including your main thread's run loop, maintains a unique process instance.


The documentation for this class was generated from the following files:

Generated on Tue Dec 2 23:38:51 2008 for PlausibleActorKit by  doxygen 1.5.5