net.sf.neem
Interface ProtocolMBean

All Known Implementing Classes:
Protocol

public interface ProtocolMBean

Interface for a JMX management bean. This allows several protocol parameters to be queried and set, in order to fine tune protocol behavior. Available parameters will change as the protocol evolves, so this interface is far from set in stone. Don't rely on it too much.


Method Summary
 void addPeer(java.lang.String addr, int port)
          Connect to a new peer.
 int getAcceptedSocks()
          Get number of socket connections accepted.
 int getBufferSize()
          Get the default size of socket buffers.
 int getBytesReceived()
          Get number of raw bytes received.
 int getBytesSent()
          Get number of raw bytes transmitted.
 int getConnectedSocks()
          Get number of successful sockets connected.
 int getDataReceived()
          Get number of data packets received.
 int getDataSent()
          Get number of data packets transmitted.
 int getDelivered()
          Get number of messages delivered to the application.
 int getGossipFanout()
          Get the number of gossip target for each round.
 int getHintsReceived()
          Get number of packet hints received.
 int getHintsSent()
          Get number of packet hints transmitted.
 int getJoinRequests()
          Get number of direct join requests received.
 java.net.InetSocketAddress getLocalAddress()
          Local listening socket.
 java.util.UUID getLocalId()
          Get globally unique local id.
 int getMaxIds()
          Get the maximum number of cached message ids.
 int getMinPullSize()
          Get the minimum size of messages that can be pulled.
 int getMulticast()
          Get number of messages multicast locally by the application.
 int getOverlayFanout()
          Get the number of neighbors.
 int getPacketsReceived()
          Get number of packets received.
 int getPacketsSent()
          Get number of packets transmited.
 java.net.InetSocketAddress[] getPeerAddresses()
          Get list of currently connected peers.
 java.util.UUID[] getPeerIds()
          Get list of currently connected peer ids.
 java.net.InetSocketAddress getPublicAddress()
          Get the address being advertised to peers.
 int getPullPeriod()
          Get period for retrying to pull known messages.
 int getPullReceived()
          Get number of pull request transmitted.
 int getPullSent()
          Get number of pull requests transmitted.
 int getPurgedConnections()
          Get number of connections purged after overflowing local neighborhood.
 int getPushTimeToLive()
          Get the maximum number of times that a message is pushed.
 int getQueueSize()
          Get the default size of buffer queues.
 int getShufflePeriod()
          Get the delay between periodic shuffle.
 int getShufflesReceived()
          Get number of shuffle requests received.
 int getShufflesSent()
          Get number of shuffle requests transmitted.
 int getTimeToLive()
          Get the maximum number of times that a message is relayed.
 void resetCounters()
          Resets all counters.
 void setBufferSize(int size)
          Set the default size of socket buffers.
 void setGossipFanout(int fanout)
          Set the number of gossip target for each round.
 void setMaxIds(int max)
          Set the maximum number of cached message ids.
 void setMinPullSize(int minPullSize)
          Set the minimum size of messages that can be pulled.
 void setOverlayFanout(int fanout)
          Set the number of neighbors.
 void setPullPeriod(int pullPeriod)
          Set period for retrying to pull known messages.
 void setPushTimeToLive(int pushttl)
          Set the maximum number of times that a message is pushed.
 void setQueueSize(int size)
          Set the default size of buffer queues.
 void setShufflePeriod(int period)
          Set the delay between periodic shuffle.
 void setTimeToLive(int ttl)
          Set the maximum number of times that a message is relayed.
 

Method Detail

getGossipFanout

int getGossipFanout()
Get the number of gossip target for each round.

Returns:
number of targets

setGossipFanout

void setGossipFanout(int fanout)
Set the number of gossip target for each round.

Parameters:
fanout - number of targets

getTimeToLive

int getTimeToLive()
Get the maximum number of times that a message is relayed.

Returns:
number of hops

setTimeToLive

void setTimeToLive(int ttl)
Set the maximum number of times that a message is relayed.

Parameters:
ttl - number of hops

getMaxIds

int getMaxIds()
Get the maximum number of cached message ids.

Returns:
number of ids

setMaxIds

void setMaxIds(int max)
Set the maximum number of cached message ids. Setting this too low may result in duplicate message deliveries.

Parameters:
max - number of ids

getPushTimeToLive

int getPushTimeToLive()
Get the maximum number of times that a message is pushed.

Returns:
number of hops

setPushTimeToLive

void setPushTimeToLive(int pushttl)
Set the maximum number of times that a message is pushed. 0 disables pushing. A large value (at least, larger than time-to-live) disables pulling.

Parameters:
pushttl - number of hops

getMinPullSize

int getMinPullSize()
Get the minimum size of messages that can be pulled.

Returns:
size in bytes

setMinPullSize

void setMinPullSize(int minPullSize)
Set the minimum size of messages that can be pulled. Smaller messages are always pushed. Setting it to a large value disables pulling.

Parameters:
minPullSize - size in bytes

getPullPeriod

int getPullPeriod()
Get period for retrying to pull known messages.

Returns:
period in milliseconds

setPullPeriod

void setPullPeriod(int pullPeriod)
Set period for retrying to pull known messages.

Parameters:
pullPeriod - period in milliseconds

getDelivered

int getDelivered()
Get number of messages delivered to the application.


getMulticast

int getMulticast()
Get number of messages multicast locally by the application.


getDataReceived

int getDataReceived()
Get number of data packets received.


getDataSent

int getDataSent()
Get number of data packets transmitted.


getHintsReceived

int getHintsReceived()
Get number of packet hints received.


getHintsSent

int getHintsSent()
Get number of packet hints transmitted.


getPullReceived

int getPullReceived()
Get number of pull request transmitted.


getPullSent

int getPullSent()
Get number of pull requests transmitted.


getLocalId

java.util.UUID getLocalId()
Get globally unique local id.

Returns:
local id

getPeerIds

java.util.UUID[] getPeerIds()
Get list of currently connected peer ids.

Returns:
connected peer ids

getPublicAddress

java.net.InetSocketAddress getPublicAddress()
Get the address being advertised to peers.

Returns:
the address

getShufflePeriod

int getShufflePeriod()
Get the delay between periodic shuffle.

Returns:
period in milliseconds

setShufflePeriod

void setShufflePeriod(int period)
Set the delay between periodic shuffle.

Parameters:
period - in milliseconds

getOverlayFanout

int getOverlayFanout()
Get the number of neighbors.

Returns:
number of neighbors

setOverlayFanout

void setOverlayFanout(int fanout)
Set the number of neighbors.

Parameters:
fanout - number of neighbors

getJoinRequests

int getJoinRequests()
Get number of direct join requests received.


getPurgedConnections

int getPurgedConnections()
Get number of connections purged after overflowing local neighborhood.


getShufflesReceived

int getShufflesReceived()
Get number of shuffle requests received.


getShufflesSent

int getShufflesSent()
Get number of shuffle requests transmitted.


getLocalAddress

java.net.InetSocketAddress getLocalAddress()
Local listening socket.


getPeerAddresses

java.net.InetSocketAddress[] getPeerAddresses()
Get list of currently connected peers.

Returns:
connected peers

addPeer

void addPeer(java.lang.String addr,
             int port)
Connect to a new peer.

Parameters:
addr - hostname or address of peer
port - listening port number

getQueueSize

int getQueueSize()
Get the default size of buffer queues.

Returns:
number of messages

setQueueSize

void setQueueSize(int size)
Set the default size of buffer queues. Currently, this does not modify existing queues, only those that are created thereafter.

Parameters:
size - number of messages

getBufferSize

int getBufferSize()
Get the default size of socket buffers.

Returns:
size in bytes

setBufferSize

void setBufferSize(int size)
Set the default size of socket buffers.

Parameters:
size - size in bytes

getAcceptedSocks

int getAcceptedSocks()
Get number of socket connections accepted.


getConnectedSocks

int getConnectedSocks()
Get number of successful sockets connected.


getPacketsReceived

int getPacketsReceived()
Get number of packets received.


getPacketsSent

int getPacketsSent()
Get number of packets transmited.


getBytesReceived

int getBytesReceived()
Get number of raw bytes received.


getBytesSent

int getBytesSent()
Get number of raw bytes transmitted.


resetCounters

void resetCounters()
Resets all counters.



Copyright © 2005 University of Minho, Portugal. All Rights Reserved.