JXTA

net.jxta.impl.rendezvous.rendezvousMeter
Class RendezvousMetric

java.lang.Object
  extended by net.jxta.impl.rendezvous.rendezvousMeter.RendezvousMetric
All Implemented Interfaces:
DocumentSerializable

public class RendezvousMetric
extends Object
implements DocumentSerializable

The Metric corresponding to the state and aggregate information of a Rendezvous Service


Field Summary
static String EDGE
           
static String RENDEZVOUS
           
static String STOPPED
           
 
Constructor Summary
RendezvousMetric()
           
RendezvousMetric(RendezvousMetric prototype)
           
 
Method Summary
 long getEdgeStartTime()
          Get the time that it began operating as an Edge
 int getNumEdgeTransitions()
          The number of times the peer has become an edge
 int getNumFailedPropagating()
          The number of outbound messages failed during propagation
 int getNumFailedPropagatingToNeighbors()
          The number of outbound messages failed when propagated to neighbors
 int getNumFailedPropagatingToPeers()
          The number of outbound messages failed when propagated to peers
 int getNumFailedRepropagating()
          The number of outbound messages failed during repropagation
 int getNumFailedWalks()
          The number of outbound messages failed attempting walk
 int getNumFailedWalkToPeers()
          The number of outbound messages failed in an attempt to walk to a set of peers
 int getNumPeersPropagatedTo()
          The number of peers that outbound messages were propagated to
 int getNumPeersWalkedTo()
          The number of peers that outbound messages were walked to
 int getNumPropagated()
          The number of outbound messages propagated
 int getNumPropagatedInGroup()
          The number of outbound messages propagated in group
 int getNumPropagatedToNeighbors()
          The number of outbound messages propagated to neighbors
 int getNumPropagatedToPeers()
          The number of outbound messages propagated to peers
 int getNumReceivedDead()
          The number of TTL Dead messages received
 int getNumReceivedDuplicate()
          The number of duplicate messages received
 int getNumReceivedInvalid()
          The number of invalid messages received
 int getNumReceivedLoopback()
          The number of messages received that originated at peer
 int getNumReceivedProcessedLocally()
          The number of messages received that were sent to local listeners
 int getNumReceivedRepropagatedInGroup()
          The number of messages received that were repropagated to the group
 long getNumRendezvousTransitions()
          The number of times the peer has become an rendezvous
 int getNumRepropagated()
          The number of outbound messages repropagated
 int getNumWalkedToPeers()
          The number of outbound messages walked to a set of peers
 int getNumWalks()
          The number of outbound messages walked
 long getRendezvousStartTime()
          Get the time that it began operating as an Rendezvous
 String getState()
          Get the current state (edge, rendezvous or stopped)
 long getTimeAsEdge()
          Get the duration of current transition to an edge

Note: This assumes the clocks are in sync with the reporting peer
 long getTimeAsEdge(long adjustmentTime)
          Get the duration of time became an edge until the specified time
 long getTimeAsRendezvous()
          Get the duration of current transition to a rendezvous

Note: This assumes the clocks are in sync with the reporting peer
 long getTimeAsRendezvous(long adjustmentTime)
          Get the duration of time became an rendezvous until the specified time
 long getTotalEdgeTime()
          Get the total time it began operating as an Edge.
 long getTotalEdgeTime(long adjustmentTime)
          Get the total time it began operating as an Edge.
 int getTotalReceived()
          The total number of inbound messages to the rendezvous service
 int getTotalReceivedUndelivered()
          The total number of inbound messages to the rendezvous service that could not be delivered
 long getTotalRendezvousTime()
          Get the total time it began operating as an Rendezvous.
 long getTotalRendezvousTime(long adjustmentTime)
          Get the total time it began operating as an Rendezvous.
 long getTransitionTime()
          Get the time that it entered the current state
 void initializeFrom(Element element)
           
(package private)  void invalidMessageReceived()
           
 boolean isEdge()
          Is this Rendezvous currently operating as an Edge
 boolean isRendezvous()
          Is this Rendezvous currently operating as an Rendezvous
 void mergeMetrics(RendezvousMetric otherRendezvousMetric)
           
(package private)  void propagateToGroup()
           
(package private)  void propagateToNeighbors()
           
(package private)  void propagateToNeighborsFailed()
           
(package private)  void propagateToPeers(int numPeers)
           
(package private)  void receivedDeadMessage()
           
(package private)  void receivedDuplicateMessage()
           
(package private)  void receivedLoopbackMessage()
           
(package private)  void receivedMessageProcessedLocally()
           
(package private)  void receivedMessageRepropagatedInGroup()
           
 void serializeTo(Element element)
           
(package private)  void startEdge(long transitionTime)
           
(package private)  void startRendezvous(long transitionTime)
           
(package private)  void stopEdge(long transitionTime, long timeAsEdge)
           
(package private)  void stopRendezvous(long transitionTime, long timeAsRendezvous)
           
(package private)  void walk()
           
(package private)  void walkFailed()
           
(package private)  void walkToPeers(int numPeers)
           
(package private)  void walkToPeersFailed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDGE

public static final String EDGE
See Also:
Constant Field Values

RENDEZVOUS

public static final String RENDEZVOUS
See Also:
Constant Field Values

STOPPED

public static final String STOPPED
See Also:
Constant Field Values
Constructor Detail

RendezvousMetric

public RendezvousMetric()

RendezvousMetric

public RendezvousMetric(RendezvousMetric prototype)
Method Detail

getState

public String getState()
Get the current state (edge, rendezvous or stopped)

Returns:
RendezvousMetric.EDGE, RendezvousMetric.RENDEZVOUS or RendezvousMetric.STOPPED

getTransitionTime

public long getTransitionTime()
Get the time that it entered the current state

Returns:
transition time in ms since January 1, 1970, 00:00:00 GMT

isEdge

public boolean isEdge()
Is this Rendezvous currently operating as an Edge


isRendezvous

public boolean isRendezvous()
Is this Rendezvous currently operating as an Rendezvous


getEdgeStartTime

public long getEdgeStartTime()
Get the time that it began operating as an Edge

Returns:
time or 0 if it is not currently an Edge

getTotalEdgeTime

public long getTotalEdgeTime()
Get the total time it began operating as an Edge.

Note: This does not include the current time as edge (if it is currently an edge)

Returns:
time in ms (see note above)
See Also:
getTotalEdgeTime(long)

getTotalEdgeTime

public long getTotalEdgeTime(long adjustmentTime)
Get the total time it began operating as an Edge. If it is currently operating as an edge, then the total time is adjusted to include the time since the transition time to an edge until the provided time

Parameters:
adjustmentTime - The time of this metric will be adjusted to
Returns:
time in ms (see note above)
See Also:
getTotalEdgeTime()

getNumEdgeTransitions

public int getNumEdgeTransitions()
The number of times the peer has become an edge


getRendezvousStartTime

public long getRendezvousStartTime()
Get the time that it began operating as an Rendezvous

Returns:
time or 0 if it is not currently an Rendezvous

getTotalRendezvousTime

public long getTotalRendezvousTime()
Get the total time it began operating as an Rendezvous.

Note: This does not include the current time as rendezvous (if it is currently an rendezvous)

Returns:
time in ms (see note above)
See Also:
getTotalRendezvousTime(long)

getTotalRendezvousTime

public long getTotalRendezvousTime(long adjustmentTime)
Get the total time it began operating as an Rendezvous. If it is currently operating as a rendezvous, then the total time is adjusted to include the time since the transition time to an rendezvous until the provided time

Parameters:
adjustmentTime - The time of this metric will be adjusted to
Returns:
time in ms (see note above)
See Also:
getTotalRendezvousTime()

getNumRendezvousTransitions

public long getNumRendezvousTransitions()
The number of times the peer has become an rendezvous


getNumReceivedProcessedLocally

public int getNumReceivedProcessedLocally()
The number of messages received that were sent to local listeners


getNumReceivedRepropagatedInGroup

public int getNumReceivedRepropagatedInGroup()
The number of messages received that were repropagated to the group


getNumReceivedInvalid

public int getNumReceivedInvalid()
The number of invalid messages received


getNumReceivedDead

public int getNumReceivedDead()
The number of TTL Dead messages received


getNumReceivedLoopback

public int getNumReceivedLoopback()
The number of messages received that originated at peer


getNumReceivedDuplicate

public int getNumReceivedDuplicate()
The number of duplicate messages received


getTotalReceivedUndelivered

public int getTotalReceivedUndelivered()
The total number of inbound messages to the rendezvous service that could not be delivered


getTotalReceived

public int getTotalReceived()
The total number of inbound messages to the rendezvous service


getNumPropagated

public int getNumPropagated()
The number of outbound messages propagated


getNumFailedPropagating

public int getNumFailedPropagating()
The number of outbound messages failed during propagation


getNumRepropagated

public int getNumRepropagated()
The number of outbound messages repropagated


getNumFailedRepropagating

public int getNumFailedRepropagating()
The number of outbound messages failed during repropagation


getNumPropagatedToPeers

public int getNumPropagatedToPeers()
The number of outbound messages propagated to peers


getNumFailedPropagatingToPeers

public int getNumFailedPropagatingToPeers()
The number of outbound messages failed when propagated to peers


getNumPeersPropagatedTo

public int getNumPeersPropagatedTo()
The number of peers that outbound messages were propagated to


getNumPropagatedInGroup

public int getNumPropagatedInGroup()
The number of outbound messages propagated in group


getNumPropagatedToNeighbors

public int getNumPropagatedToNeighbors()
The number of outbound messages propagated to neighbors


getNumFailedPropagatingToNeighbors

public int getNumFailedPropagatingToNeighbors()
The number of outbound messages failed when propagated to neighbors


getNumWalks

public int getNumWalks()
The number of outbound messages walked


getNumFailedWalks

public int getNumFailedWalks()
The number of outbound messages failed attempting walk


getNumWalkedToPeers

public int getNumWalkedToPeers()
The number of outbound messages walked to a set of peers


getNumFailedWalkToPeers

public int getNumFailedWalkToPeers()
The number of outbound messages failed in an attempt to walk to a set of peers


getNumPeersWalkedTo

public int getNumPeersWalkedTo()
The number of peers that outbound messages were walked to


getTimeAsEdge

public long getTimeAsEdge()
Get the duration of current transition to an edge

Note: This assumes the clocks are in sync with the reporting peer

Returns:
time in ms (see note above) or 0 if not edge
See Also:
getTimeAsEdge(long)

getTimeAsEdge

public long getTimeAsEdge(long adjustmentTime)
Get the duration of time became an edge until the specified time

Parameters:
adjustmentTime - The time of this metric will be computed until
Returns:
time in ms (see note above) or 0 if not connected
See Also:
getTimeAsEdge()

getTimeAsRendezvous

public long getTimeAsRendezvous()
Get the duration of current transition to a rendezvous

Note: This assumes the clocks are in sync with the reporting peer

Returns:
time in ms (see note above) or 0 if not edge
See Also:
getTimeAsRendezvous(long)

getTimeAsRendezvous

public long getTimeAsRendezvous(long adjustmentTime)
Get the duration of time became an rendezvous until the specified time

Parameters:
adjustmentTime - The time of this metric will be computed until
Returns:
time in ms (see note above) or 0 if not connected
See Also:
getTimeAsRendezvous()

startEdge

void startEdge(long transitionTime)

stopEdge

void stopEdge(long transitionTime,
              long timeAsEdge)

startRendezvous

void startRendezvous(long transitionTime)

stopRendezvous

void stopRendezvous(long transitionTime,
                    long timeAsRendezvous)

invalidMessageReceived

void invalidMessageReceived()

receivedMessageProcessedLocally

void receivedMessageProcessedLocally()

receivedMessageRepropagatedInGroup

void receivedMessageRepropagatedInGroup()

receivedDeadMessage

void receivedDeadMessage()

receivedLoopbackMessage

void receivedLoopbackMessage()

receivedDuplicateMessage

void receivedDuplicateMessage()

propagateToPeers

void propagateToPeers(int numPeers)

propagateToNeighbors

void propagateToNeighbors()

propagateToNeighborsFailed

void propagateToNeighborsFailed()

propagateToGroup

void propagateToGroup()

walk

void walk()

walkFailed

void walkFailed()

walkToPeers

void walkToPeers(int numPeers)

walkToPeersFailed

void walkToPeersFailed()

mergeMetrics

public void mergeMetrics(RendezvousMetric otherRendezvousMetric)

serializeTo

public void serializeTo(Element element)
                 throws DocumentSerializationException
Specified by:
serializeTo in interface DocumentSerializable
Throws:
DocumentSerializationException

initializeFrom

public void initializeFrom(Element element)
                    throws DocumentSerializationException
Specified by:
initializeFrom in interface DocumentSerializable
Throws:
DocumentSerializationException

JXSE