com.sun.multicast.reliable.transport.tram
Class TRAMTransportProfile

java.lang.Object
  |
  +--com.sun.multicast.reliable.transport.tram.TRAMTransportProfile
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, TransportProfile

public class TRAMTransportProfile
extends java.lang.Object
implements TransportProfile, java.lang.Cloneable, java.io.Serializable

A TransportProfile for TRAM (Tree-based Reliable Multicast Protocol).

This class adds several transport-specific public methods that control transport-specific parameters. Several of the most interesting are getMinDataRate, setMinDataRate, getMaxDataRate, and setMaxDataRate. These allow the application to specify minimum and maximum data rates for the session. The minimum rate is purely advisory for now. It may be used later to prune receivers that can't keep up. The maximum data rate is used to throttle outgoing data. This avoids overrunning network elements.

See Also:
TransportProfile, Serialized Form

Field Summary
protected static int LATE_JOIN_WITH_FULL_RECOVERY
          Constant to specify the Late Join preference.
static int LATE_JOIN_WITH_LIMITED_RECOVERY
          Constant to specify the Late Join preference.
static int LATE_JOIN_WITH_NO_RECOVERY
          Constant to specify the Late Join preference.
static int LOG_CONGESTION
          Constant to specify 'Logging of Congestion' related messages.
static int LOG_CONTROL_MESG
          Constant to specify 'Logging of TRAM Control' messages.
static int LOG_DATA_CACHE
          Constant to specify 'Logging of Data Cache related' messages.
static int LOG_DATA_MESG
          Constant to specify 'Logging of TRAM Data' messages.
static int LOG_DIAGNOSTICS
          Constant to specify 'Log DIAGNOSTICS' messages.
static int LOG_INFO
          Constant to specify 'Log INFO' messages.
static int LOG_NONE
          Constant to specify 'Log nothing' option.
static int LOG_PERFORMANCE_MONITOR
          Level for visual performance monitor.
static int LOG_SECURITY
          Constant to specify 'Logging of Security related' messages.
static int LOG_SESSION_STATUS
          Constant to specify 'Logging of Multicast session related' messages.
static int LOG_TEST
          Constant to specify 'Logging of Test related' messages.
static int LOG_VERBOSE
          Constant to specify 'Log Everything' option.
static int MAX_CONG_WINDOW_MULTIPLE
           
static int MIN_CONG_WINDOW_MULTIPLE
          constant to limit congestionWindow as a multiple of ackWindow.
static int TREE_FORM_HA
          Constant to specify the algorithm to use to build the TRAM repair tree.
static int TREE_FORM_HA_STATIC_R
           
static int TREE_FORM_HA_STATIC_RW
           
static int TREE_FORM_HAMTHA
          Constant to specify the algorithm to use to build the TRAM repair tree.
static int TREE_FORM_HAMTHA_STATIC_R
           
static int TREE_FORM_HAMTHA_STATIC_RW
           
static int TREE_FORM_MTHA
          Constant to specify the algorithm to use to build the TRAM repair tree.
static int TREE_FORM_MTHA_STATIC_R
           
static int TREE_FORM_MTHA_STATIC_RW
           
static int TREE_FORM_STATIC_R
          Constants to specify the algorithm to use to build the TRAM repair tree.
static int TREE_FORM_STATIC_RW
           
 
Fields inherited from interface com.sun.multicast.reliable.transport.TransportProfile
RECEIVER, REPAIR_NODE, SEND_RECEIVE, SENDER
 
Constructor Summary
TRAMTransportProfile(java.net.InetAddress ia, int port)
          Creates an TRAMTransportProfile using the Multicast Address and port specified.
TRAMTransportProfile(java.lang.String filename)
          Creates an TRAMTransportProfile using the details specified in a configuration file.
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this transport profile.
 RMPacketSocket createRMPacketSocket(int sendReceive)
          Creates an RMPacketSocket using this TransportProfile.
 RMPacketSocket createRMPacketSocket(int sendReceive, java.net.InetAddress interfaceAddress)
          Creates an RMPacketSocket using this TransportProfile.
 RMPacketSocket createRMPacketSocket(int sendReceive, java.net.InetAddress interfaceAddress, TRAMSimulator simulator)
          Creates an RMPacketSocket using this TransportProfile and a TRAMSimulator object.
 RMPacketSocket createRMPacketSocket(int sendReceive, TRAMSimulator simulator)
          Creates an RMPacketSocket using this TransportProfile and a TRAMSimulator object.
 RMStreamSocket createRMStreamSocket(int sendReceive)
          Creates an RMStreamSocket using this TransportProfile.
 RMStreamSocket createRMStreamSocket(int sendReceive, java.net.InetAddress interfaceAddress)
          Creates an RMStreamSocket using this TransportProfile.
 boolean decentralizedPruning()
           
 void disableAuthentication()
          Disables the use of Authentication by the transport.
 void enableAuthentication()
          Enables the use of authentication by the transport.
 short getAckWindow()
          Gets the Acknowledgement window size.
 java.net.InetAddress getAddress()
          Returns the multicast address specified in the TransportProfile.
 java.lang.String getAuthenticationSpecFileName()
          Gets the name of the authenticationSpec filename that is to be used for initialization.
 java.lang.String getAuthenticationSpecPassword()
          Gets the password for the authenticationSpec
 long getBeaconRate()
          Gets the rate at which the Beacon messages are sent.
 byte getBeaconTTLIncrements()
          Gets the TTL steps by which the multicast scope of the beacon message is incremented.
 int getCacheSize()
          Gets the maximum cache size in packets
 int getCongestionWindow()
          Gets the current congestion window size.
 java.net.InetAddress getDataSourceAddress()
          Gets the source address of the multicast data stream.
 long getHaInterval()
          Gets the interval between successive Head Advertisements.
 byte getHaTTLIncrements()
          Gets the TTL steps by which the multicast scope of the Head Advertisement message is to be incremented.
 byte getHaTTLLimit()
          Gets the TTL limit of the Head Advertisement message.
 long getHelloRate()
          Gets the rate at which the Hello messages are sent.
 int getLateJoinPreference()
          Gets the current Late join preference.
 int getLogMask()
           
 int getMaxBuf()
          This method returns the maximum buffer size used in reception of data packets.
 int getMaxCongestionWindowMultiple()
           
 int getMaxConsecutiveCongestionCount()
           
 long getMaxDataRate()
          Gets the maximum rate data transfer.
 long getMaxHABWWhileDataTransfer()
          Gets the configured limit on the bandwidth usage by HA message during the multicast data transfer.
 long getMaxHABWWhileTreeForming()
          Gets the configured limit on the bandwidth usage by HA message during the tree formation phase(before the multicast data starts).
 byte getMaxHelloMisses()
          Gets the count of Hello messages that are to be missed continuously by a member to declare the head inactive and re-affiliate with another head.
 short getMaxMembers()
          Gets the limit of the number of members that a group head can accommodate.
 int getMaxNonHeads()
          Gets the configured limit of the number of non Head members(i.e., members with MROLE set to MEMBER_ONLY) that can be accepted as members while performing the role of a head.
 int getMaxPruneTime()
          Gets the maximum time to wait before pruning a slow member
 long getMinDataRate()
          Gets the minimum rate of data transfer.
 int getMissingPacketThreshold()
           
 byte getMrole()
          Gets the specified Member Role(mrole) value in the Transport profile.
 long getMsRate()
          Gets the rate at which the Member Solicitation(MS) messages are sent.
 byte getMsTTLIncrements()
          Gets the TTL steps by which the multicast scope of the Member Solicitation(MS) message is to be incremented.
 short getNackReportWindow()
          Gets the size of the negative Acknowledgement window.
 java.lang.String getName()
          Returns the name of this transport.
 int getPort()
          Returns the multicast port number specified in the TransportProfile.
 long getPruneHelloRate()
          Gets the rate at which the Hello messages are sent after it has been detected that a member has not sent an ACK.
 double getPruningWindow()
           
 double getRateIncreaseFactor()
           
 int getReceiveBufferSize()
          This function returns the value that was asked to be set using setReceiveBufferSize.
 long getReceiverMaxDataRate()
           
 boolean getSAhead()
          Method to test if REPAIR_NODE mode is turned on.
 int getSessionId()
          Gets the session ID associated with this transport profile.
 int getTimeForAvgRateCalc()
           
 byte getTmode()
          Gets the specified Transport Mode(tmode) value in the transport profile.
 double getTransferDataSize()
          Gets the transfer data size that is currently in use.
 long getTransferDuration()
          Gets allowed duration of data transfer.
 int getTreeFormationPreference(boolean mask)
          Gets the configured tree formation preference.
 byte getTTL()
          Returns the time-to-live for this TransportProfile.
 int getUnicastPort()
          Gets the unicast communication port in use.
 boolean isLanTreeFormationEnabled()
          Method to test whether or not lan tree formation is allowed.
 boolean isLoggingEnabled()
          Method to test the logging status.
 boolean isLoggingEnabled(int testLogMask)
           
 boolean isMultiSender()
          Determines if multiple senders are supported with this TransportProfile.
 boolean isOrdered()
          Test method to check if Packet Ordering option is enabled in the Transport profile.
 boolean isSmoothTransmission()
          Gets the flag indicating whether or not bursting transmission is allowed.
 boolean isUsingAuthentication()
          Returns the value of the authentication flag.
 boolean isValid()
          Tests whether this TransportProfile is valid.
static void main(java.lang.String[] args)
           
 boolean reaffiliateAfterBeingDisowned()
          Gets the flag indicating whether or not to reaffiliate after being disowned.
 void setAckWindow(short ackWindow)
          Sets the size of the acknowledgement window to the required value.
 void setAddress(java.net.InetAddress address)
          Sets the multicast address for this TransportProfile.
 void setAuthenticationSpecFileName(java.lang.String specFileName)
          Sets the name of the authenticationSpec filename to use for Authentication Module initialization.
 void setAuthenticationSpecPassword(java.lang.String password)
          Sets the password for the authenticationSpec
 void setBeaconRate(long beaconRate)
          Sets the required rate at which the beacon messages are to be sent.
 void setBeaconTTLIncrements(byte beaconTTLIncrements)
          Sets the TTL steps by which the multicast scope of the beacon message is incremented.
 void setCacheSize(int cacheSize)
          Sets the maximum size of the cache in packets.
 void setCongestionWindow(int congestionWindow)
          Set the value of the congestion window.
 void setDataSourceAddress(java.net.InetAddress dataSourceAddress)
          Sets the source address of the multicast data session..
 void setDecentralizedPruning(boolean decentralizedPruning)
           
 void setHaInterval(long haInterval)
          Sets the interval between two successive HA messages with the specified value.
 void setHaTTLIncrements(byte haTTLIncrements)
          Sets the TTL steps by which the multicast scope of the HA message is to be incremented.
 void setHaTTLLimit(byte haTTLLimit)
          Sets the TTL limit of the Head Advertisement message.
 void setHelloRate(long helloRate)
          Sets the required Hello Rate value.
 void setLanTreeFormation(boolean b)
          Method to turn on or turn off lan tree formation.
 void setLateJoinPreference(int lateJoinPreference)
          Sets the Late join preference for the session.
 void setLogMask(int logMask)
          Method to turn on or turn off the logging mechanism.
 void setMaxBuf(int size)
          This method sets the maximum buffer size used in reception of data packets.
 void setMaxCongestionWindowMultiple(int congestionWindowMultiple)
          Set the maximum congestion window multiple.
 void setMaxConsecutiveCongestionCount(int maxConsecutiveCongestionCount)
           
 void setMaxDataRate(long maxDataRate)
          Sets the maximum rate at which the multicast data messages can be sent.
 void setMaxHABWWhileDataTransfer(long maxHABWWhileDataTransfer)
          Sets the maximum Bandwidth that can be used by HA messages while the multicast data transfer is in progress.
 void setMaxHABWWhileTreeForming(long maxHABWWhileTreeForming)
          Sets the maximum Bandwidth that can be used by HA messages before the multicast data transfer starts.
 void setMaxHelloMisses(byte maxHelloMisses)
          Sets the count of Hello messages that are to be missed, continuously, by a member to disown a head.
 void setMaxMembers(short maxMembers)
          Sets the maximum limit of members that a repair head can accommodate.
 void setMaxNonHeads(int maxNonHeads)
          sets the configured limit of the number of non Heads(i.e., MEMBER_ONLY) that can be accepted as members while performing the role of a head.
 void setMaxPruneTime(int time)
          Sets the maximum time (in seconds) to wait before pruning a slow member Default is 5 seconds.
 void setMinDataRate(long minDataRate)
          Sets the minimum rate of data transmission to the specified value.
 void setMissingPacketThreshold(int missingPacketThreshold)
           
 void setMrole(byte mrole)
          Set the required Member Role(mrole) value in the transport profile.
 void setMsRate(long msRate)
          Sets the required Member Solicitation(MS) rate value.
 void setMsTTLIncrements(byte msTTLIncrements)
          Sets the TTL steps by which the multicast scope of the Member Solicitation(MS) message is to be incremented.
 void setMultiSender(boolean multisender)
          Sets the value of the multisender flag.
 void setNackReportWindow(short nackReportWindow)
          Sets the Negative Acknowledgement window size to the preferred value.
 void setOrdered(boolean ordered)
          Sets the Packet Ordering preference in the transport profile.
 void setPort(int port)
          Sets the multicast port number for this TransportProfile.
 void setPruneHelloRate(long pruneHelloRate)
          Sets the rate at which the Hello messages are sent after it has been detected that a member has not sent an ACK.
 void setPruningWindow(double pruningWindow)
           
 void setRateIncreaseFactor(double rateIncreaseFactor)
           
 void setreaffiliateAfterBeingDisowned(boolean rad)
          Sets the flag indicating whether or not to reaffiliate after being disowned.
 void setReceiveBufferSize(int rbs)
          Sets the receive buffer size.
 void setReceiverMaxDataRate(long receiverMaxDataRate)
           
 void setSessionId(int sessionId)
          Sets the session ID associated with this transport profile.
 void setSmoothTransmission(boolean smoothTransmission)
          Sets the flag to indicate that the sender should try to smooth out the transmission of packets as much as possible over time rather than sending out bursts of packets.
 void setTimeForAvgRateCalc(int timeForAverageRateCalc)
           
 void setTmode(byte tmode)
          Set the required Transport Mode(tmode) value in the Transport Profile.
 void setTransferDataSize(double transferDataSize)
          Sets the size of the data that is to be transferred.
 void setTransferDuration(long transferDuration)
          Sets the allowed duration of Data transfer(in minutes).
 void setTreeFormationPreference(int treeFormationPreference)
          Sets the tree formation preference for the session.
 void setTTL(byte ttl)
          Sets the value for the Time-to-live.
 void setUnicastPort(int unicastPort)
          Sets the unicast port that is to be used for exchange of control messages.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_CONG_WINDOW_MULTIPLE

public static final int MIN_CONG_WINDOW_MULTIPLE
constant to limit congestionWindow as a multiple of ackWindow.

MAX_CONG_WINDOW_MULTIPLE

public static final int MAX_CONG_WINDOW_MULTIPLE

LATE_JOIN_WITH_LIMITED_RECOVERY

public static final int LATE_JOIN_WITH_LIMITED_RECOVERY
Constant to specify the Late Join preference. LATE_JOIN_WITH_LIMITED_RECOVERY specifies the transport, in case of a late join, to recover as much of data as possible.

LATE_JOIN_WITH_FULL_RECOVERY

protected static final int LATE_JOIN_WITH_FULL_RECOVERY
Constant to specify the Late Join preference. LATE_JOIN_WITH_FULL_RECOVERY specifies the transport, in case of a late join, to recover all of prior data. Typically used by applications like file transfer.

LATE_JOIN_WITH_NO_RECOVERY

public static final int LATE_JOIN_WITH_NO_RECOVERY
Constant to specify the Late Join preference. LATE_JOIN_WITH_NO_RECOVERY specifies the transport, in case of a late join, to recover none of the earlier data. Typically used by realtime applications like stock quotes.

TREE_FORM_HA

public static final int TREE_FORM_HA
Constant to specify the algorithm to use to build the TRAM repair tree. The constant TREE_FORM_HA specifies the transport to use Head Advertisement(HA) algorithm to build the dynamic repair tree. Refer TRAM protocol information to learn more about HA algorithm.

TREE_FORM_MTHA

public static final int TREE_FORM_MTHA
Constant to specify the algorithm to use to build the TRAM repair tree. The constant TREE_FORM_MTHA specifies the transport to use Member Triggered Head Advertisement(HA) algorithm to build the dynamic repair tree. Refer TRAM protocol information to learn more about MTHA algorithm.

TREE_FORM_HAMTHA

public static final int TREE_FORM_HAMTHA
Constant to specify the algorithm to use to build the TRAM repair tree. The constant TREE_FORM_HAMTHA specifies the transport to use the combination of bothe HA and MTHA algorithm to build the dynamic repair tree. Refer TRAM protocol information to learn more about HAMTHA algorithm.

TREE_FORM_STATIC_R

public static final int TREE_FORM_STATIC_R
Constants to specify the algorithm to use to build the TRAM repair tree. The constants TREE_FORM_HA_S, TREE_FORM_MTHA_S, TREE_FORM_HAMTHA_S specify modified dynamic tree formation algorithms that use a file to store configured, or tree formation information from past sessions. The are the same as the corresponding dynamic ones, except the information read from the file is used to restrict who are eligible to be a head. The file contains a number of lines. Each line contains a IP address and a ttl. (e.g. 129.10.20.30 1) If ttl=0 and the address is the local host address, then you are allowed to be a head. Otherwise, the address is that of an eligible head for you.

TREE_FORM_STATIC_RW

public static final int TREE_FORM_STATIC_RW

TREE_FORM_HA_STATIC_R

public static final int TREE_FORM_HA_STATIC_R

TREE_FORM_MTHA_STATIC_R

public static final int TREE_FORM_MTHA_STATIC_R

TREE_FORM_HAMTHA_STATIC_R

public static final int TREE_FORM_HAMTHA_STATIC_R

TREE_FORM_HA_STATIC_RW

public static final int TREE_FORM_HA_STATIC_RW

TREE_FORM_MTHA_STATIC_RW

public static final int TREE_FORM_MTHA_STATIC_RW

TREE_FORM_HAMTHA_STATIC_RW

public static final int TREE_FORM_HAMTHA_STATIC_RW

LOG_VERBOSE

public static final int LOG_VERBOSE
Constant to specify 'Log Everything' option. Choosing this option will result in logging every logging message in the code path as a result the performance severely degrades.

LOG_NONE

public static final int LOG_NONE
Constant to specify 'Log nothing' option. This option causes logging to be turned off. Fatal error conditions will over-ride this logging preference and get logged anyways.

LOG_DIAGNOSTICS

public static final int LOG_DIAGNOSTICS
Constant to specify 'Log DIAGNOSTICS' messages. Choosing this option will result in logging important events in the code path - logs important usual events and all unusual/error events in the code path. Typically used while debugging an operational code.

LOG_INFO

public static final int LOG_INFO
Constant to specify 'Log INFO' messages. Choosing this option will result in logging very important events or milestones. This is typically the recommended mode of logging for a code base that is operational.

LOG_CONGESTION

public static final int LOG_CONGESTION
Constant to specify 'Logging of Congestion' related messages. Choosing this option will result in logging all events related to TRAM congestion control. This mode is recommended for functionality based debugging.

LOG_CONTROL_MESG

public static final int LOG_CONTROL_MESG
Constant to specify 'Logging of TRAM Control' messages. Choosing this option will result in logging TRAM control message (both send and reception) events. This mode is recommended for functionality based debugging.

LOG_DATA_MESG

public static final int LOG_DATA_MESG
Constant to specify 'Logging of TRAM Data' messages. Choosing this option will result in logging TRAM data message (both send and reception) events. This mode is recommended for functionality based debugging.

LOG_SESSION_STATUS

public static final int LOG_SESSION_STATUS
Constant to specify 'Logging of Multicast session related' messages. Choosing this option will result in logging TRAM messages that session related - like, the sender is not sending data or joined the session late. This mode is recommended for functionality based debugging.

LOG_SECURITY

public static final int LOG_SECURITY
Constant to specify 'Logging of Security related' messages. Choosing this option will result in logging TRAM messages that are related to security. The logging takes place when any one of the security option (authentication & cipher) is turned on. This mode is recommended for functionality based debugging.

LOG_DATA_CACHE

public static final int LOG_DATA_CACHE
Constant to specify 'Logging of Data Cache related' messages. Choosing this option will result in logging TRAM messages that are related to TRAM data cache. This mode is recommended for functionality based debugging.

LOG_TEST

public static final int LOG_TEST
Constant to specify 'Logging of Test related' messages. Choosing this option will result in logging TRAM messages that are not based on any particular functionality but those messages that are interesting for the current testing.

LOG_PERFORMANCE_MONITOR

public static final int LOG_PERFORMANCE_MONITOR
Level for visual performance monitor. Choosing this option will result in a performance monitor which is started as a separate thread. The monitor will graphically display the current data rate and the average data rate.
Constructor Detail

TRAMTransportProfile

public TRAMTransportProfile(java.lang.String filename)
                     throws java.io.IOException
Creates an TRAMTransportProfile using the details specified in a configuration file.
Parameters:
filename - the name of an TRAM configuration file
Throws:
java.io.IOException - if an I/O exception occurs

TRAMTransportProfile

public TRAMTransportProfile(java.net.InetAddress ia,
                            int port)
                     throws java.io.IOException,
                            InvalidMulticastAddressException
Creates an TRAMTransportProfile using the Multicast Address and port specified.
Parameters:
ia - a multicast InetAddress
port - the multicast port number
Throws:
java.io.IOException - if an I/O exception occurs
InvalidMulticastAddressException - if the multicast address supplied is not a multicast address
Method Detail

main

public static void main(java.lang.String[] args)

createRMStreamSocket

public RMStreamSocket createRMStreamSocket(int sendReceive)
                                    throws UnsupportedException,
                                           InvalidTransportProfileException,
                                           java.io.IOException
Creates an RMStreamSocket using this TransportProfile.
Specified by:
createRMStreamSocket in interface TransportProfile
Parameters:
sendReceive - indicates whether this socket is being used to send or receive data. The code automatically fills in the tmode and mrole fields based on this parameter.
Returns:
a new RMStreamSocket
Throws:
UnsupportedException - if the transport does not support a stream interface.
InvalidTransportProfileException - if the TransportProfile is not valid
java.io.IOException - if an I/O exception occurs.

createRMStreamSocket

public RMStreamSocket createRMStreamSocket(int sendReceive,
                                           java.net.InetAddress interfaceAddress)
                                    throws UnsupportedException,
                                           InvalidTransportProfileException,
                                           java.io.IOException
Creates an RMStreamSocket using this TransportProfile.
Parameters:
sendReceive - indicates whether this socket is being used to send or receive data. The code automatically fills in the tmode and mrole fields based on this parameter.
interfaceAddress - indicates the IP address of the interface to use for the multicast socket.
Returns:
a new RMStreamSocket
Throws:
UnsupportedException - if the transport does not support a stream interface.
InvalidTransportProfileException - if the TransportProfile is not valid
java.io.IOException - if an I/O exception occurs.

createRMPacketSocket

public RMPacketSocket createRMPacketSocket(int sendReceive)
                                    throws UnsupportedException,
                                           InvalidTransportProfileException,
                                           java.io.IOException
Creates an RMPacketSocket using this TransportProfile.
Specified by:
createRMPacketSocket in interface TransportProfile
Parameters:
sendReceive - indicates whether this socket is being used to send or receive data. The code automatically fills in the tmode and mrole fields based on this parameter.
Returns:
a new RMPacketSocket
Throws:
UnsupportedException - if the transport does not support a packet interface.
InvalidTransportProfileException - if the TransportProfile is not valid
java.io.IOException - if an I/O exception occurs.

createRMPacketSocket

public RMPacketSocket createRMPacketSocket(int sendReceive,
                                           java.net.InetAddress interfaceAddress)
                                    throws UnsupportedException,
                                           InvalidTransportProfileException,
                                           java.io.IOException
Creates an RMPacketSocket using this TransportProfile.
Parameters:
sendReceive - indicates whether this socket is being used to send or receive data. The code automatically fills in the tmode and mrole fields based on this parameter.
interfaceAddress - indicates the IP address of the interface to use for the multicast socket.
Returns:
a new RMPacketSocket
Throws:
UnsupportedException - if the transport does not support a packet interface.
InvalidTransportProfileException - if the TransportProfile is not valid
java.io.IOException - if an I/O exception occurs.

createRMPacketSocket

public RMPacketSocket createRMPacketSocket(int sendReceive,
                                           TRAMSimulator simulator)
                                    throws UnsupportedException,
                                           InvalidTransportProfileException,
                                           java.io.IOException
Creates an RMPacketSocket using this TransportProfile and a TRAMSimulator object. Note: this method is used only for simulation purposes.
Parameters:
sendReceive - indicates whether this socket is being used to send or receive data. The code automatically fills in the tmode and mrole fields based on this parameter.
simulator - specifies the simulator object being used
Returns:
a new RMPacketSocket
Throws:
UnsupportedException - if the transport does not support a packet interface.
InvalidTransportProfileException - if the TransportProfile is not valid
java.io.IOException - if an I/O exception occurs.

createRMPacketSocket

public RMPacketSocket createRMPacketSocket(int sendReceive,
                                           java.net.InetAddress interfaceAddress,
                                           TRAMSimulator simulator)
                                    throws UnsupportedException,
                                           InvalidTransportProfileException,
                                           java.io.IOException
Creates an RMPacketSocket using this TransportProfile and a TRAMSimulator object. Note: this method is used only for simulation purposes.
Parameters:
sendReceive - indicates whether this socket is being used to send or receive data. The code automatically fills in the tmode and mrole fields based on this parameter.
interfaceAddress - indicates the IP address of the interface to use for the multicast socket.
simulator - specifies the simulator object being used
Returns:
a new RMPacketSocket
Throws:
UnsupportedException - if the transport does not support a packet interface.
InvalidTransportProfileException - if the TransportProfile is not valid
java.io.IOException - if an I/O exception occurs.

clone

public java.lang.Object clone()
Returns a copy of this transport profile.
Specified by:
clone in interface TransportProfile
Overrides:
clone in class java.lang.Object
Returns:
the clone of the passed transport profile.

isValid

public boolean isValid()
Tests whether this TransportProfile is valid. A TransportProfile is valid if, as far as can be determined, it could be used to send or receive data. Possible causes for invalid TransportProfiles include not setting the multicast address, port, and TTL (or other transport-specific problems).
Specified by:
isValid in interface TransportProfile
Returns:
true if the TransportProfile is valid; false otherwise

getName

public java.lang.String getName()
Returns the name of this transport. The transport sets the name field. Applications cannot modify this field.
Specified by:
getName in interface TransportProfile
Returns:
the name of the transport

getSAhead

public boolean getSAhead()
Method to test if REPAIR_NODE mode is turned on. Note if REPAIR_NODE is turned on, the transport will not support local receiver application that is, any received data from the network will not be forward towards the local application. This should be turned on only if the transport is to perform the role of a repair head.
Returns:
true if REPAIR_NODE flag is set(turned on). false if REPAIR_NODE flag is turned off.

getAddress

public java.net.InetAddress getAddress()
Returns the multicast address specified in the TransportProfile.
Specified by:
getAddress in interface TransportProfile
Returns:
the multicast address for this TransportProfile

setAddress

public void setAddress(java.net.InetAddress address)
                throws InvalidMulticastAddressException
Sets the multicast address for this TransportProfile.
Specified by:
setAddress in interface TransportProfile
Parameters:
address - the new multicast address.
Throws:
InvalidMulticastAddressException - if an the address specified is not a multicast address.

getPort

public int getPort()
Returns the multicast port number specified in the TransportProfile.
Specified by:
getPort in interface TransportProfile
Returns:
the multicast port number for this TransportProfile.

setPort

public void setPort(int port)
Sets the multicast port number for this TransportProfile.
Specified by:
setPort in interface TransportProfile
Parameters:
port - the new multicast port number.

getTTL

public byte getTTL()
Returns the time-to-live for this TransportProfile. The time-to-live value indicates the range of multicast messages.
Specified by:
getTTL in interface TransportProfile
Returns:
the time-to-live value for this TransportProfile.

setTTL

public void setTTL(byte ttl)
Sets the value for the Time-to-live. The ttl indicates the range of the multicast messages sent on the multicast address/port. The default value is 1 (local area).
Specified by:
setTTL in interface TransportProfile
Parameters:
ttl - the value of the time-to-live parameter.

isMultiSender

public boolean isMultiSender()
Determines if multiple senders are supported with this TransportProfile.
Specified by:
isMultiSender in interface TransportProfile
Returns:
true if multiple senders are supported with this TransportProfile; false otherwise.

setMultiSender

public void setMultiSender(boolean multisender)
                    throws UnsupportedException
Sets the value of the multisender flag. If the application wishes to support multiple senders with this TransportProfile, this flag must be set to true.
Specified by:
setMultiSender in interface TransportProfile
Parameters:
multisender - true if the application wishes to support multiple senders; false otherwise
Throws:
UnsupportedException - if the transport does not support multiple senders.

isOrdered

public boolean isOrdered()
Test method to check if Packet Ordering option is enabled in the Transport profile. If the application requires that the data is returned to the application in the order which it was sent, the ordered flag needs to be set. If the application doesn't care which order the data arrives in, this flag can be set to false. This flag is only valid for RMPacketSockets.
Specified by:
isOrdered in interface TransportProfile
Returns:
true if ordering was enabled; false if ordering was disabled.

isUsingAuthentication

public boolean isUsingAuthentication()
Returns the value of the authentication flag. If the flag is set(true), it indicates that the data packets are authenticated.
Specified by:
isUsingAuthentication in interface TransportProfile
Returns:
true indicates that the data packets are authenticated false indicates that the data packets are not authenticated/signed.

setOrdered

public void setOrdered(boolean ordered)
Sets the Packet Ordering preference in the transport profile. Setting this flag to true indicates that all data is to be forwarded to the application in the order it was sent. Setting this flag to false indicates that the application will get the data in the order that it was received, which may not be the order that it was sent.
Specified by:
setOrdered in interface TransportProfile
Parameters:
ordered - true to enable; false to disable ordering.

getMrole

public byte getMrole()
Gets the specified Member Role(mrole) value in the Transport profile. The Member Role specifies the role that the Transport has to perform in the TRAM Group management.
Returns:
the value of the mrole (Member Role) field.
See Also:
MROLE

setMrole

public void setMrole(byte mrole)
              throws java.lang.IllegalArgumentException
Set the required Member Role(mrole) value in the transport profile. The Member Role specifies the role that the Transport has to perform in the TRAM Group management. If either MEMBER_EAGER_HEAD or MEMBER_RELUCTANT_HEAD is specified, then the transport performs roll of a head which involves data caching and performing repair operations.
Parameters:
mrole - the mrole value that is to be set. Default is MEMBER_ONLY.
Throws:
java.lang.IllegalArgumentException - if the mrole value is invalid.
See Also:
MROLE

getTmode

public byte getTmode()
Gets the specified Transport Mode(tmode) value in the transport profile. The Transport Mode specifies the role that the Transport has to perform. The value SEND_RECEIVE is for future use.
Returns:
the value of the tmode(Transport Mode) field.
See Also:
TMODE

setTmode

public void setTmode(byte tmode)
              throws java.lang.IllegalArgumentException
Set the required Transport Mode(tmode) value in the Transport Profile. The Transport Mode specifies the role that the Transport has to perform.
Parameters:
tmode - the tmode value that is to be set. Default is RECEIVE_ONLY.
Throws:
java.lang.IllegalArgumentException - if the tmode value is invalid.
See Also:
TMODE

getMaxMembers

public short getMaxMembers()
Gets the limit of the number of members that a group head can accommodate. The maxMembers limits the number of members that a group head can accept. The default limit is 32. The maxMembers field is applicable only when the mrole is set to a non MEMBER_ONLY value.
Returns:
current limit of maximum members a group head can accommodate.

setMaxMembers

public void setMaxMembers(short maxMembers)
Sets the maximum limit of members that a repair head can accommodate. The maxMembers limits the number of members that a group head can accept. The default limit is 32. The maxMembers field is applicable only when the mrole is set to a non MEMBER_ONLY value.
Parameters:
maxMembers - The maximum count of members that a group head can accommodate. Default is 32.

getHelloRate

public long getHelloRate()
Gets the rate at which the Hello messages are sent. The helloRate specifies the rate at which hello messages are sent by the group heads. The helloRate value is in milli-seconds.
Returns:
The helloRate value in milliseconds.

setHelloRate

public void setHelloRate(long helloRate)
Sets the required Hello Rate value. The helloRate specifies the rate at which hello messages are sent by the group heads. The helloRate value is in milli-seconds.
Parameters:
helloRate - The preferred helloRate value(in milliseconds) that is to be set. Default is 1000 ms.

getPruneHelloRate

public long getPruneHelloRate()
Gets the rate at which the Hello messages are sent after it has been detected that a member has not sent an ACK. The value is in milli-seconds.
Returns:
the pruneHelloRate value in milliseconds.

setPruneHelloRate

public void setPruneHelloRate(long pruneHelloRate)
Sets the rate at which the Hello messages are sent after it has been detected that a member has not sent an ACK. The value is in milli-seconds.
Parameters:
pruneHelloRate - The preferred pruneHelloRate value (in milliseconds) that is to be set. Default is 1000 ms.

getMsRate

public long getMsRate()
Gets the rate at which the Member Solicitation(MS) messages are sent. The msRate specifies the rate at which Member-Solicitation messages are sent by the transports seeking group membership. The msRate value is in milli-seconds.
Returns:
The MS rate in milliseconds.

setMsRate

public void setMsRate(long msRate)
Sets the required Member Solicitation(MS) rate value. The msRate specifies the rate at which MS messages are sent by the transports seeking group membership. The msRate value is in milli-seconds.
Parameters:
msRate - The required MS Rate(in Milliseconds) that is to be set. Default is 500 ms.

getBeaconRate

public long getBeaconRate()
Gets the rate at which the Beacon messages are sent. The beaconRate specifies the rate at which beacon messages are sent by the SENDER transport. This beaconRate is required for transports with tmode of SEND_ONLY. The beaconRate value is in milli-seconds.
Returns:
The current beacon message rate(in milliseconds)

setBeaconRate

public void setBeaconRate(long beaconRate)
Sets the required rate at which the beacon messages are to be sent. The beaconRate specifies the rate at which beacon messages are sent by the SENDER transport. This beaconRate field is required for transports with tmode of SEND_ONLY. The beaconRate value is in milli-seconds.
Parameters:
beaconRate - The beacon Rate value(in milliseconds) that is to be set. Default is 1000 ms.

getAckWindow

public short getAckWindow()
Gets the Acknowledgement window size. The AckWindow specifies window size of the ACK messages. In no packet loss periods, a member sends an ack message for every 'ackWindow' number of messages received.
Returns:
The current size of the acknowledgement.

setAckWindow

public void setAckWindow(short ackWindow)
Sets the size of the acknowledgement window to the required value. The AckWindow specifies window size of the ACK messages. In no packet loss periods, a member sends an ack message for every 'ackWindow' number of messages received.
Parameters:
ackWindow - The acknowledge window size(in terms of packets) that is to be set. The default value is 32 packets. At high data rates, it makes sense to increase this value.

setCongestionWindow

public void setCongestionWindow(int congestionWindow)
Set the value of the congestion window. This value is the number of packets to be received to determine if this member is experiencing congestion.
Parameters:
congestionWindow - the number of packets in the congestion window. The default is 32 packets.

getCongestionWindow

public int getCongestionWindow()
Gets the current congestion window size.
Returns:
the value of the congestion window. This value is the number of packets over which congestion is evaluated.

getNackReportWindow

public short getNackReportWindow()
Gets the size of the negative Acknowledgement window. The NackReportWindow specifies window size of the messages that need to be recognized to have been dispatched by the sender to trigger ack message with retransmission request to be generated.
Returns:
The negative Acknowledgement window size.

setNackReportWindow

public void setNackReportWindow(short nackReportWindow)
Sets the Negative Acknowledgement window size to the preferred value. The NackReportWindow specifies window size of the messages that need to be recognized to have been dispatched by the sender to trigger ack message with retransmission request to be generated.
Parameters:
nackReportWindow - The required negative Acknowledgement window size that is to be set. Default is 5.

getMaxHelloMisses

public byte getMaxHelloMisses()
Gets the count of Hello messages that are to be missed continuously by a member to declare the head inactive and re-affiliate with another head. The maxHelloMisses field is a count of the number of hello messages that need to be missed successively in order to declare a dependent head as inactive.
Returns:
The count of Hello messages that is to be missed to declare a head inactive.

setMaxHelloMisses

public void setMaxHelloMisses(byte maxHelloMisses)
Sets the count of Hello messages that are to be missed, continuously, by a member to disown a head. The maxHelloMisses field is a count of the number of hello messages that need to be missed successively in order to declare a dependent head as down.
Parameters:
maxHelloMisses - The required count of hello messages to be missed continuously to declare a head inactive. Default value is 4.

getBeaconTTLIncrements

public byte getBeaconTTLIncrements()
Gets the TTL steps by which the multicast scope of the beacon message is incremented. The beaconTTLIncrements field specifies TTL increments between two successive beacon messages. This required as the beacon messages are sent using expanding ring technique. This field is valid only in transports that have tmode of SEND_ONLY.
Returns:
The current value of the beaconTTLIncrements field.

setBeaconTTLIncrements

public void setBeaconTTLIncrements(byte beaconTTLIncrements)
Sets the TTL steps by which the multicast scope of the beacon message is incremented. The beaconTTLIncrements field specifies TTL increments between two successive beacon messages. This required as the beacon messages are sent using expanding ring technique. This field is valid only in transports that have tmode of SEND_ONLY.
Parameters:
beaconTTLIncrements - The required TTL steps by which multicast scope of the Beacon message is to be increased. Default is 2.

getUnicastPort

public int getUnicastPort()
Gets the unicast communication port in use. The unicast port is used for exchange of unicast control messages. This field is optional. If specified and if the specified port is free, the transport uses it. If the port is not free, transport initialization fails. If the unicastPort is not specified, then the transport uses the system allocated one.
Returns:
The unicastPort value..

setUnicastPort

public void setUnicastPort(int unicastPort)
Sets the unicast port that is to be used for exchange of control messages. This field is optional. If specified, the port, if free, is used. If the port is not free, transport initialization fails. If the unicastPort is unspecified, then the transport uses the system allocated one.
Parameters:
unicastPort - The unicast port value that is to be set.

getTransferDataSize

public double getTransferDataSize()
Gets the transfer data size that is currently in use. The transferDataSize field is optional and when specified, it indicates total size of the data transfer in bytes for the duration of the multicast session. This can be specified for data transfer applications like FTP. Note: if this field is specified, transferDuration field should also be specified.
Returns:
The current transfer Data Size.

setTransferDataSize

public void setTransferDataSize(double transferDataSize)
Sets the size of the data that is to be transferred. The transferDataSize field is optional and when specified, it indicates size of the data transfer in bytes for the duration of the multicast session. This can be specified for data transfer applications like FTP. Note: if this field is specified, transferDuration field should also be specified.
Parameters:
transferDataSize - The required size of the data that is to be transferred(in bytes). Default is 0.

getTransferDuration

public long getTransferDuration()
Gets allowed duration of data transfer. The transferDuration field specifies the allowed duration of the data transfer in the worst case conditions. It is recommended the knowledge/ history of similar data transfer(may be unicast) be used as a guideline to choose the appropriate duration. This field is optional and when specified, the transport in its attempt to complete the data transfer in the duration specified may prune members that are unable at a minimal rate determined with the use of transferDataSize field. Note: if this field is specified, transferDataSize field should also be specified.

Note: This is currently not supported.

Returns:
The Duration of data transfer value in use.

setTransferDuration

public void setTransferDuration(long transferDuration)
Sets the allowed duration of Data transfer(in minutes). The transferDuration field specifies the expected duration of the data transfer in the worst case conditions. It is recommended the knowledge/ history of similar data transfer(may be unicast) be used as a guideline to choose the appropriate duration. This field is optional and when specified, the transport in its attempt to complete the data transfer in the duration specified may prune members that are unable at a minimal rate determined with the use of transferDataSize field. Note: if this field is specified, transferDataSize field should also be specified.

Note: This is currently not supported.

Parameters:
transferDuration - The required duration of data transfer in minutes. Default is 0.

getMinDataRate

public long getMinDataRate()
Gets the minimum rate of data transfer. The value specified is in bytes/second. The transmitter attempts to maintain the minimum data rate under all conditions.
Returns:
the minimum rate of data transmission in use(in bytes/second).

setMinDataRate

public void setMinDataRate(long minDataRate)
Sets the minimum rate of data transmission to the specified value.
Parameters:
minDataRate - the minimum rate of transmission in bytes/second. default is 0.

getMaxDataRate

public long getMaxDataRate()
Gets the maximum rate data transfer. The transmitter will attempt to the send data up to the maximum data rate specified.
Returns:
the maximum data rate in use(in bytes/second).

setMaxDataRate

public void setMaxDataRate(long maxDataRate)
Sets the maximum rate at which the multicast data messages can be sent.
Parameters:
maxDataRate - the maximum rate of transmission in bytes/second. Default is 64000.

getDataSourceAddress

public java.net.InetAddress getDataSourceAddress()
Gets the source address of the multicast data stream.
Returns:
the source address of the multicast data session.

setDataSourceAddress

public void setDataSourceAddress(java.net.InetAddress dataSourceAddress)
Sets the source address of the multicast data session..
Parameters:
dataSourceAddress - the source address of the multicast data stream.

setLogMask

public void setLogMask(int logMask)
Method to turn on or turn off the logging mechanism. When logging is turned on, the debug messages from the transport appear on the standard output.
Parameters:
logMask - - the level of logging required to be turned on.

isLoggingEnabled

public boolean isLoggingEnabled()
Method to test the logging status.
Returns:
true if logging is enabled/turned on. false if logging is disabled/turned off.

isLoggingEnabled

public boolean isLoggingEnabled(int testLogMask)

getLogMask

public int getLogMask()

setLanTreeFormation

public void setLanTreeFormation(boolean b)
Method to turn on or turn off lan tree formation.
Parameters:
b - true to enable/turn on. false to disable/turn off.

isLanTreeFormationEnabled

public boolean isLanTreeFormationEnabled()
Method to test whether or not lan tree formation is allowed.
Returns:
true if lan tree formation is enabled/turned on. false if lan tree formation is disabled/turned off.

getMaxNonHeads

public int getMaxNonHeads()
Gets the configured limit of the number of non Head members(i.e., members with MROLE set to MEMBER_ONLY) that can be accepted as members while performing the role of a head. If there are only eager heads in a setup, then the maximum number members accepted is limited by maxMembers. In a setup where there are MEMBER_ONLYs, RELUCTANT_HEADs, EAGER_HEADs, then the distribution will be as follows, A head can have up to maxNonHeads number of MEMBER_ONLY and and can have up to (maxMembers - maxNonHeads) of HEADs.
Returns:
count on the number of non eager members that can be accommodated while performing the role of a head.

setMaxNonHeads

public void setMaxNonHeads(int maxNonHeads)
sets the configured limit of the number of non Heads(i.e., MEMBER_ONLY) that can be accepted as members while performing the role of a head. The chosen value should not exceed the maxMembers value. The default value is 2/3 the value of maxMembers.
Parameters:
maxNonHeads - the new limit of maximum non eager that is to be set.

getHaTTLIncrements

public byte getHaTTLIncrements()
Gets the TTL steps by which the multicast scope of the Head Advertisement message is to be incremented. The field specifies TTL increments between two successive HA messages. This is required as the HA messages are sent using expanding ring technique.
Returns:
The TTL increments for the HA messages..

setHaTTLIncrements

public void setHaTTLIncrements(byte haTTLIncrements)
Sets the TTL steps by which the multicast scope of the HA message is to be incremented. The value specifies TTL increments between two successive HA messages. This required as the HA messages are sent using expanding ring technique.
Parameters:
haTTLIncrements - The preferred TTL steps by which multicast scope of the HA message is to be increased. Default is 2.

getHaTTLLimit

public byte getHaTTLLimit()
Gets the TTL limit of the Head Advertisement message.
Returns:
The TTL increment value for the HA messages.

setHaTTLLimit

public void setHaTTLLimit(byte haTTLLimit)
Sets the TTL limit of the Head Advertisement message.
Parameters:
haTTLLimit - The TTL limit of the Head Advertisement message.

getMsTTLIncrements

public byte getMsTTLIncrements()
Gets the TTL steps by which the multicast scope of the Member Solicitation(MS) message is to be incremented. The field specifies TTL increments between two successive MS messages. This required as the MS messages are sent using expanding ring technique.
Returns:
The TTL increments for the MS messages..

setMsTTLIncrements

public void setMsTTLIncrements(byte msTTLIncrements)
Sets the TTL steps by which the multicast scope of the Member Solicitation(MS) message is to be incremented. The value specifies TTL increments between two successive MS messages. This required as the MS messages are sent using expanding ring technique.
Parameters:
msTTLIncrements - The preferred TTL steps by which multicast scope of the HA message is to be increased. Default is 2.

getMaxHABWWhileDataTransfer

public long getMaxHABWWhileDataTransfer()
Gets the configured limit on the bandwidth usage by HA message during the multicast data transfer.
Returns:
the maximum data rate to be used by HA messages(bytes/sec) during the multicast data transfer.

setMaxHABWWhileDataTransfer

public void setMaxHABWWhileDataTransfer(long maxHABWWhileDataTransfer)
Sets the maximum Bandwidth that can be used by HA messages while the multicast data transfer is in progress. Default is 0 bytes/sec.
Parameters:
maxHABWWhileDataTransfer - the maximum bandwidth for HA HA messages during data transfer. Default is 0 bytes/sec.

getMaxHABWWhileTreeForming

public long getMaxHABWWhileTreeForming()
Gets the configured limit on the bandwidth usage by HA message during the tree formation phase(before the multicast data starts).
Returns:
the maximum data rate to be used by HA messages(bytes/sec) before the multicast data transfer starts(Tree forming stage).

setMaxHABWWhileTreeForming

public void setMaxHABWWhileTreeForming(long maxHABWWhileTreeForming)
Sets the maximum Bandwidth that can be used by HA messages before the multicast data transfer starts. Default is Max Data Rate.
Parameters:
maxHABWWhileTreeForming - the maximum bandwidth for HA HA messages before data transfer. Default is Max Data rate value.

getHaInterval

public long getHaInterval()
Gets the interval between successive Head Advertisements. The specifies the rate at which Head Advertisement messages are sent. This Head Advertisement interval is valid for transports with non MEMBER_ONLY MROLE. The HAInterval value is in milli-seconds.
Returns:
The currently chosen rate(in milliseconds) for the HA messages.

setHaInterval

public void setHaInterval(long haInterval)
Sets the interval between two successive HA messages with the specified value. The haInterval specifies the rate at which HA messages are sent by the transport. This Head Advertisement interval is valid for transports with non MEMBER_ONLY MROLE.The HAInterval value is in milli-seconds.
Parameters:
haInterval - The preferred HAInterval value(in milliseconds) that is to be set. Default is 1000 ms.

getLateJoinPreference

public int getLateJoinPreference()
Gets the current Late join preference. The valid values are LATE_JOIN_WITH_LIMITED_RECOVERY, LATE_JOIN_WITH_FULL_RECOVERY and LATE_JOIN_WITH_NO_RECOVERY. LATE_JOIN_WITH_LIMITED_RECOVERY implies that the lost messages will be repaired to the extent that they are available at the affiliated head. LATE_JOIN_WITH_FULL_RECOVERY option implies that ALL the lost packets are to be repaired. If the packets are unavailable at the head, then the packet retransmissions are to sought from a different head or from the message logger. LATE_JOIN_WITH_NO_RECOVERY indicates earlier data are not to be recovered.
Returns:
The currently chosen preference for late join handling.

setLateJoinPreference

public void setLateJoinPreference(int lateJoinPreference)
Sets the Late join preference for the session. The valid values are LATE_JOIN_WITH_LIMITED_RECOVERY, LATE_JOIN_WITH_FULL_RECOVERY and LATE_JOIN_WITH_NO_RECOVERY. LATE_JOIN_WITH_LIMITED_RECOVERY implies that the lost messages will be repaired to the extent that they are available at the affiliated head. LATE_JOIN_WITH_FULL_RECOVERY option implies that ALL the lost packets are to be repaired. If the packets are unavailable at the head, then the packet retransmissions are to sought from a different head or from the message logger. LATE_JOIN_WITH_NO_RECOVERY indicates earlier data are not to be recovered.
Parameters:
lateJoinPreference - The preferred late join preference that is to be set. Default is LATE_JOIN_WITH_LIMITED_RECOVERY.

getTreeFormationPreference

public int getTreeFormationPreference(boolean mask)
Gets the configured tree formation preference. The valid values are TREE_FORM_HA, TREE_FORM_MTHA, and TREE_FORM_HAMTHA, TREE_FORM_HA means that Head Advertisements are used. TREE_FORM_MTHA means that member-triggered Head Advetisements are used. TREE_FORM_HAMTHA means that Head Advertisements are used until data starts flowing, then member-triggered Head Advetisements are used.
Returns:
The currently chosen tree formation preference.

setTreeFormationPreference

public void setTreeFormationPreference(int treeFormationPreference)
Sets the tree formation preference for the session.
Parameters:
treeFormationPreference - The preferred late join preference that is to be set. Default is LATE_JOIN_WITH_LIMITED_RECOVERY.

getMaxBuf

public int getMaxBuf()
This method returns the maximum buffer size used in reception of data packets. Increase the default value if the application sends large packets. Decrease the size to reduce memory consumption. This parameter must be as large as the largest buffer sent.
Returns:
the current maximum buffer size.

setMaxBuf

public void setMaxBuf(int size)
This method sets the maximum buffer size used in reception of data packets. Increase the default value if the application sends large packets. Decrease the size to reduce memory consumption. This parameter must be as large as the largest buffer sent.
Parameters:
size - the new maximum buffer size.

enableAuthentication

public void enableAuthentication()
Enables the use of authentication by the transport.
Specified by:
enableAuthentication in interface TransportProfile

disableAuthentication

public void disableAuthentication()
Disables the use of Authentication by the transport.
Specified by:
disableAuthentication in interface TransportProfile

getAuthenticationSpecFileName

public java.lang.String getAuthenticationSpecFileName()
Gets the name of the authenticationSpec filename that is to be used for initialization.
Specified by:
getAuthenticationSpecFileName in interface TransportProfile
Returns:
authenticationSpecFileName currently specified.

setAuthenticationSpecFileName

public void setAuthenticationSpecFileName(java.lang.String specFileName)
Sets the name of the authenticationSpec filename to use for Authentication Module initialization.
Specified by:
setAuthenticationSpecFileName in interface TransportProfile
Parameters:
specFileName - the name of the authentication Spec file name.

getAuthenticationSpecPassword

public java.lang.String getAuthenticationSpecPassword()
Gets the password for the authenticationSpec
Specified by:
getAuthenticationSpecPassword in interface TransportProfile
Returns:
authenticationSpecPassword currently specified.

setAuthenticationSpecPassword

public void setAuthenticationSpecPassword(java.lang.String password)
Sets the password for the authenticationSpec
Specified by:
setAuthenticationSpecPassword in interface TransportProfile
Parameters:
password - the password for the authenticationSpec.

getSessionId

public int getSessionId()
Gets the session ID associated with this transport profile.
Returns:
the session ID associated with this transport profile.

setSessionId

public void setSessionId(int sessionId)
Sets the session ID associated with this transport profile.
Parameters:
the - session ID associated with this transport profile.

setSmoothTransmission

public void setSmoothTransmission(boolean smoothTransmission)
Sets the flag to indicate that the sender should try to smooth out the transmission of packets as much as possible over time rather than sending out bursts of packets.

isSmoothTransmission

public boolean isSmoothTransmission()
Gets the flag indicating whether or not bursting transmission is allowed.

setCacheSize

public void setCacheSize(int cacheSize)
Sets the maximum size of the cache in packets. Default is 1200 packets.

getCacheSize

public int getCacheSize()
Gets the maximum cache size in packets

setMaxPruneTime

public void setMaxPruneTime(int time)
Sets the maximum time (in seconds) to wait before pruning a slow member Default is 5 seconds.

getMaxPruneTime

public int getMaxPruneTime()
Gets the maximum time to wait before pruning a slow member

setreaffiliateAfterBeingDisowned

public void setreaffiliateAfterBeingDisowned(boolean rad)
Sets the flag indicating whether or not to reaffiliate after being disowned. This is used to make a member exit quickly after being pruned.

reaffiliateAfterBeingDisowned

public boolean reaffiliateAfterBeingDisowned()
Gets the flag indicating whether or not to reaffiliate after being disowned.

setDecentralizedPruning

public void setDecentralizedPruning(boolean decentralizedPruning)

decentralizedPruning

public boolean decentralizedPruning()

setPruningWindow

public void setPruningWindow(double pruningWindow)

getPruningWindow

public double getPruningWindow()

setReceiverMaxDataRate

public void setReceiverMaxDataRate(long receiverMaxDataRate)

getReceiverMaxDataRate

public long getReceiverMaxDataRate()

setMaxConsecutiveCongestionCount

public void setMaxConsecutiveCongestionCount(int maxConsecutiveCongestionCount)

getMaxConsecutiveCongestionCount

public int getMaxConsecutiveCongestionCount()

setReceiveBufferSize

public void setReceiveBufferSize(int rbs)
Sets the receive buffer size. By default, TRAM tries to find the biggest buffer size the system will allow. On Solaris this is usually 256k.

getReceiveBufferSize

public int getReceiveBufferSize()
This function returns the value that was asked to be set using setReceiveBufferSize. This does not return the value of the receiver buffer that was "actually" set at the socket. The actual value set may be different from the one requested.

setRateIncreaseFactor

public void setRateIncreaseFactor(double rateIncreaseFactor)

getRateIncreaseFactor

public double getRateIncreaseFactor()

setTimeForAvgRateCalc

public void setTimeForAvgRateCalc(int timeForAverageRateCalc)

getTimeForAvgRateCalc

public int getTimeForAvgRateCalc()

setMissingPacketThreshold

public void setMissingPacketThreshold(int missingPacketThreshold)

getMissingPacketThreshold

public int getMissingPacketThreshold()

setMaxCongestionWindowMultiple

public void setMaxCongestionWindowMultiple(int congestionWindowMultiple)
Set the maximum congestion window multiple.

getMaxCongestionWindowMultiple

public int getMaxCongestionWindowMultiple()


JavaTM Reliable MulticastTM Service version 1.1
Copyright (c) 2001, Sun Microsystems Laboratories, All rights reserved.