All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javaNOW.Mailbox

java.lang.Object
   |
   +----javaNOW.Mailbox

public class Mailbox
extends Object
implements Cloneable, Serializable
Mailbox: Mailbox stores messagesentries in a vector Even though Mailbox implements Serializable, it will not transfer Vector of MessageList

See Also:
class, method

Variable Index

 o DEFAULT_HASH_SIZE
 o MAX_WAIT
Constants

Constructor Index

 o Mailbox()
Constructors
 o Mailbox(MailboxKey)

Method Index

 o clear()
remove all messages in the mailbox
 o get(Message)
Removes message from message space in nonblocking fashion.
 o getCreatorKey()
 o getHashSize()
Accesss
 o getMailboxKey()
 o getMessageCount()
It returns number of messages in the messagespace
 o getMessageCount(Message)
It returns number of messages in the messagespace that matches the message value as that of theMessage
 o getp(Message)
Removes message from message space in nonblocking fashion.
 o getpType(Message)
It returns vector of messages that match the message value of the theMessage
 o getpType(Message, int)
It returns nth message in the message space that matches the message value as that of theMessage
 o present(Message)
Returns true if message exist in message spaces (nonblocking)
 o put(Message)
Inserts a message into message space
 o read(Message)
Returns a copy of message from message space in nonblocking fashion.
 o readp(Message)
Returns a copy of message from message space in nonblocking fashion.
 o readpType(Message)
It is same as getpType() couterpart except it returns copy of messages
 o readpType(Message, int)
It is same as getpType() couterpart except it returns copy of messages
 o setCreatorKey(CreatorKey)
 o setHashSize(int)
Modifiers
 o setMailboxKey(MailboxKey)
 o sync(int)
It blocks until message space contains numMessages number of messages
 o toString()
 o waitUntilFound(Message)
Waits until message exist in message spaces (blocking)

Variables

 o MAX_WAIT
 public static final int MAX_WAIT
Constants

See Also:
class, method
 o DEFAULT_HASH_SIZE
 public static final int DEFAULT_HASH_SIZE

Constructors

 o Mailbox
 public Mailbox()
Constructors

See Also:
class, method
 o Mailbox
 public Mailbox(MailboxKey k)

Methods

 o getHashSize
 public int getHashSize()
Accesss

See Also:
class, method
 o getMailboxKey
 public Object getMailboxKey()
 o getp
 public Message getp(Message t) throws UninitializedMailbox
Removes message from message space in nonblocking fashion. If message does not exist, it returns null

See Also:
class, method
 o get
 public Message get(Message t) throws UninitializedMailbox, SingleThreadBlockException
Removes message from message space in nonblocking fashion. If message does not exist, it blocks until it is inserted

See Also:
class, method
 o getpType
 public Vector getpType(Message t) throws UninitializedMailbox
It returns vector of messages that match the message value of the theMessage

See Also:
class, method
 o getpType
 public Message getpType(Message t,
                         int n) throws UninitializedMailbox
It returns nth message in the message space that matches the message value as that of theMessage

See Also:
class, method
 o present
 public boolean present(Message t) throws UninitializedMailbox
Returns true if message exist in message spaces (nonblocking)

See Also:
class, method
 o waitUntilFound
 public void waitUntilFound(Message t) throws UninitializedMailbox, SingleThreadBlockException
Waits until message exist in message spaces (blocking)

See Also:
class, method
 o readp
 public Message readp(Message t) throws UninitializedMailbox
Returns a copy of message from message space in nonblocking fashion. If message does not exist, it returns null

See Also:
class, method
 o read
 public Message read(Message t) throws UninitializedMailbox, SingleThreadBlockException
Returns a copy of message from message space in nonblocking fashion. If message does not exist, it blocks until it is inserted

See Also:
class, method
 o readpType
 public Vector readpType(Message t) throws UninitializedMailbox
It is same as getpType() couterpart except it returns copy of messages

See Also:
class, method
 o readpType
 public Message readpType(Message t,
                          int n) throws UninitializedMailbox
It is same as getpType() couterpart except it returns copy of messages

See Also:
class, method
 o getCreatorKey
 public CreatorKey getCreatorKey()
 o getMessageCount
 public int getMessageCount(Message msg)
It returns number of messages in the messagespace that matches the message value as that of theMessage

See Also:
class, method
 o getMessageCount
 public int getMessageCount()
It returns number of messages in the messagespace

See Also:
class, method
 o sync
 public void sync(int numMessages) throws SingleThreadBlockException
It blocks until message space contains numMessages number of messages

See Also:
class, method
 o setHashSize
 public void setHashSize(int hsize)
Modifiers

See Also:
class, method
 o put
 public void put(Message t) throws UninitializedMailbox, SingleThreadBlockException
Inserts a message into message space

See Also:
class, method
 o setMailboxKey
 public void setMailboxKey(MailboxKey k)
 o setCreatorKey
 public void setCreatorKey(CreatorKey k)
 o toString
 public String toString()
Overrides:
toString in class Object
 o clear
 public void clear() throws SingleThreadBlockException
remove all messages in the mailbox

See Also:
class, method

All Packages  Class Hierarchy  This Package  Previous  Next  Index