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
-
DEFAULT_HASH_SIZE
-
-
MAX_WAIT
- Constants
-
Mailbox()
- Constructors
-
Mailbox(MailboxKey)
-
-
clear()
- remove all messages in the mailbox
-
get(Message)
- Removes message from message space in nonblocking fashion.
-
getCreatorKey()
-
-
getHashSize()
- Accesss
-
getMailboxKey()
-
-
getMessageCount()
- It returns number of messages in the messagespace
-
getMessageCount(Message)
- It returns number of messages in the messagespace that matches the
message value as that of theMessage
-
getp(Message)
- Removes message from message space in nonblocking fashion.
-
getpType(Message)
- It returns vector of messages that match the message value of the
theMessage
-
getpType(Message, int)
- It returns nth message in the message space that matches the message value
as that of theMessage
-
present(Message)
- Returns true if message exist in message spaces (nonblocking)
-
put(Message)
- Inserts a message into message space
-
read(Message)
- Returns a copy of message from message space in nonblocking fashion.
-
readp(Message)
- Returns a copy of message from message space in nonblocking fashion.
-
readpType(Message)
- It is same as getpType() couterpart except it returns copy of messages
-
readpType(Message, int)
- It is same as getpType() couterpart except it returns copy of messages
-
setCreatorKey(CreatorKey)
-
-
setHashSize(int)
- Modifiers
-
setMailboxKey(MailboxKey)
-
-
sync(int)
- It blocks until message space contains numMessages number of messages
-
toString()
-
-
waitUntilFound(Message)
- Waits until message exist in message spaces (blocking)
MAX_WAIT
public static final int MAX_WAIT
- Constants
- See Also:
- class, method
DEFAULT_HASH_SIZE
public static final int DEFAULT_HASH_SIZE
Mailbox
public Mailbox()
- Constructors
- See Also:
- class, method
Mailbox
public Mailbox(MailboxKey k)
getHashSize
public int getHashSize()
- Accesss
- See Also:
- class, method
getMailboxKey
public Object getMailboxKey()
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
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
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
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
present
public boolean present(Message t) throws UninitializedMailbox
- Returns true if message exist in message spaces (nonblocking)
- See Also:
- class, method
waitUntilFound
public void waitUntilFound(Message t) throws UninitializedMailbox, SingleThreadBlockException
- Waits until message exist in message spaces (blocking)
- See Also:
- class, method
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
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
readpType
public Vector readpType(Message t) throws UninitializedMailbox
- It is same as getpType() couterpart except it returns copy of messages
- See Also:
- class, method
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
getCreatorKey
public CreatorKey getCreatorKey()
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
getMessageCount
public int getMessageCount()
- It returns number of messages in the messagespace
- See Also:
- class, method
sync
public void sync(int numMessages) throws SingleThreadBlockException
- It blocks until message space contains numMessages number of messages
- See Also:
- class, method
setHashSize
public void setHashSize(int hsize)
- Modifiers
- See Also:
- class, method
put
public void put(Message t) throws UninitializedMailbox, SingleThreadBlockException
- Inserts a message into message space
- See Also:
- class, method
setMailboxKey
public void setMailboxKey(MailboxKey k)
setCreatorKey
public void setCreatorKey(CreatorKey k)
toString
public String toString()
- Overrides:
- toString in class Object
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