org.axonframework.commandhandling.distributed.jgroups
Class JoinMessage

java.lang.Object
  extended by org.axonframework.commandhandling.distributed.jgroups.JoinMessage
All Implemented Interfaces:
Externalizable, Serializable, org.jgroups.util.Streamable

public class JoinMessage
extends Object
implements org.jgroups.util.Streamable, Externalizable

This message represents a notification of a Member joining the DistributedCommandBus with a given loadFactor. Upon receiving this message, members should recalculate their Consistent Hash Ring, including this member.

Since:
2.0
Author:
Allard Buijze
See Also:
Serialized Form

Constructor Summary
JoinMessage()
          Default constructor required by the Streamable and Externalizable interfaces.
JoinMessage(int loadFactor, Set<String> commandNames)
          Initializes a JoinMessage with the given loadFactor.
 
Method Summary
 Set<String> getCommandNames()
          Returns a read-only view on the Command Names supported by the joining member.
 int getLoadFactor()
          Returns the loadFactor the member wishes to join with.
 void readExternal(ObjectInput in)
           
 void readFrom(DataInput in)
           
 void writeExternal(ObjectOutput out)
           
 void writeTo(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinMessage

public JoinMessage()
Default constructor required by the Streamable and Externalizable interfaces. Do not use directly.


JoinMessage

public JoinMessage(int loadFactor,
                   Set<String> commandNames)
Initializes a JoinMessage with the given loadFactor.

Parameters:
loadFactor - The loadFactor the member wishes to join with
commandNames - The command types supported by this node as fully qualified class names.
Method Detail

getLoadFactor

public int getLoadFactor()
Returns the loadFactor the member wishes to join with.

Returns:
the loadFactor the member wishes to join with.

getCommandNames

public Set<String> getCommandNames()
Returns a read-only view on the Command Names supported by the joining member. Each String in the given Set represents the name of a supported command.

Returns:
a read-only view on the Command Types supported by the joining member

writeTo

public void writeTo(DataOutput out)
             throws IOException
Specified by:
writeTo in interface org.jgroups.util.Streamable
Throws:
IOException

readFrom

public void readFrom(DataInput in)
              throws IOException
Specified by:
readFrom in interface org.jgroups.util.Streamable
Throws:
IOException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException


Copyright © 2010-2016. All Rights Reserved.