Package org.jgroups.protocols
Class FRAG.FragmentationList
java.lang.Object
org.jgroups.protocols.FRAG.FragmentationList
- Enclosing class:
FRAG
A fragmentation list keeps a list of fragmentation tables
sorted by an Address ( the sender ).
This way, if the sender disappears or leaves the group half way
sending the content, we can simply remove this members fragmentation
table and clean up the memory of the receiver.
We do not have to do the same for the sender, since the sender doesn't keep a fragmentation table
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Address sender, FRAG.FragmentationTable table) Adds a fragmentation table for this particular sender If this sender already has a fragmentation table, an IllegalArgumentException will be thrown.booleancontainsSender(Address sender) returns true if this sender already holds a fragmentation for this sender, false otherwisereturns a fragmentation table for this sender returns null if the sender doesn't have a fragmentation tableAddress[]returns a list of all the senders that have fragmentation tables opened.booleanremoves the fragmentation table from the list.toString()
-
Field Details
-
frag_tables
-
-
Constructor Details
-
FragmentationList
FragmentationList()
-
-
Method Details
-
add
Adds a fragmentation table for this particular sender If this sender already has a fragmentation table, an IllegalArgumentException will be thrown.- Parameters:
sender- - the address of the sender, cannot be nulltable- - the fragmentation table of this sender, cannot be null- Throws:
IllegalArgumentException- if an entry for this sender already exist
-
get
returns a fragmentation table for this sender returns null if the sender doesn't have a fragmentation table- Returns:
- the fragmentation table for this sender, or null if no table exist
-
containsSender
returns true if this sender already holds a fragmentation for this sender, false otherwise- Parameters:
sender- - the sender, cannot be null- Returns:
- true if this sender already has a fragmentation table
-
remove
removes the fragmentation table from the list. after this operation, the fragementation list will no longer hold a reference to this sender's fragmentation table- Parameters:
sender- - the sender who's fragmentation table you wish to remove, cannot be null- Returns:
- true if the table was removed, false if the sender doesn't have an entry
-
getSenders
returns a list of all the senders that have fragmentation tables opened.- Returns:
- an array of all the senders in the fragmentation list
-
toString
-