dist1.acb.CBL.concretePackets
Class ResponseHotJoinInfo

java.lang.Object
  extended bydist1.acb.common.transport.Packet
      extended bydist1.acb.common.transport.Response
          extended bydist1.acb.CBL.concretePackets.ResponseHotJoinInfo
All Implemented Interfaces:
java.io.Serializable

public class ResponseHotJoinInfo
extends Response

Response for request about a hot join

Version:
$Revision: 1.4 $
Author:
Alexander Stasiv
See Also:
Serialized Form

Field Summary
static byte BACKUP_NEEDS_REPLICAS
          One of the possible values of the state: the primary must send replicas to the backup
static byte PRIMARY_NEEDS_REPLICAS
          One of the possible values of the state: the backup must send replicas to the primary
static byte SYNCHRONIZED
          One of the possible values of the state: the databases are synchronized, we can continue without additional steps
 
Constructor Summary
ResponseHotJoinInfo(Request request, java.net.InetSocketAddress primary)
          Creates a new instance of ResponseHotJoinInfo state=SYNCHRONIZED
ResponseHotJoinInfo(Request request, java.net.InetSocketAddress primary, Id lastReplicaId)
          Creates a new instance of ResponseHotJoinInfo state=PRIMARY_NEEDS_REPLICAS
ResponseHotJoinInfo(Request request, java.net.InetSocketAddress primary, java.util.LinkedList replicas)
          Creates a new instance of ResponseHotJoinInfo state=BACKUP_NEEDS_REPLICAS
 
Method Summary
 Id getLastReplicaId()
          Getter for property lastReplicaId.
 java.net.InetSocketAddress getPrimary()
          Getter for property primary.
 java.util.LinkedList getReplicas()
          Getter for property replicas.
 byte getState()
          Getter for property state.
 void setLastReplicaId(Id lastReplicaId)
          Setter for property lastReplicaId.
 void setPrimary(java.net.InetSocketAddress primary)
          Setter for property primary.
 void setReplicas(java.util.LinkedList replicas)
          Setter for property replicas.
 void setState(byte state)
          Setter for property state.
 java.lang.String toString()
          Returns string with description of the object
 
Methods inherited from class dist1.acb.common.transport.Packet
equals, getId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SYNCHRONIZED

public static final byte SYNCHRONIZED
One of the possible values of the state: the databases are synchronized, we can continue without additional steps

See Also:
Constant Field Values

PRIMARY_NEEDS_REPLICAS

public static final byte PRIMARY_NEEDS_REPLICAS
One of the possible values of the state: the backup must send replicas to the primary

See Also:
Constant Field Values

BACKUP_NEEDS_REPLICAS

public static final byte BACKUP_NEEDS_REPLICAS
One of the possible values of the state: the primary must send replicas to the backup

See Also:
Constant Field Values
Constructor Detail

ResponseHotJoinInfo

public ResponseHotJoinInfo(Request request,
                           java.net.InetSocketAddress primary)
Creates a new instance of ResponseHotJoinInfo state=SYNCHRONIZED

Parameters:
request - The response will be created for this request (it will inherit the id). If request is null the id will be zero.
primary - Socket address of the Primary

ResponseHotJoinInfo

public ResponseHotJoinInfo(Request request,
                           java.net.InetSocketAddress primary,
                           Id lastReplicaId)
Creates a new instance of ResponseHotJoinInfo state=PRIMARY_NEEDS_REPLICAS

Parameters:
request - The response will be created for this request (it will inherit the id). If request is null the id will be zero.
primary - Socket address of the Primary
lastReplicaId - Last replica which the Primary has

ResponseHotJoinInfo

public ResponseHotJoinInfo(Request request,
                           java.net.InetSocketAddress primary,
                           java.util.LinkedList replicas)
Creates a new instance of ResponseHotJoinInfo state=BACKUP_NEEDS_REPLICAS

Parameters:
request - The response will be created for this request (it will inherit the id). If request is null the id will be zero.
primary - Socket address of the Primary
replicas - LinkedList of replicas for the backup
Method Detail

setLastReplicaId

public void setLastReplicaId(Id lastReplicaId)
Setter for property lastReplicaId.

Parameters:
lastReplicaId - New value of property lastReplicaId.

getLastReplicaId

public Id getLastReplicaId()
Getter for property lastReplicaId.

Returns:
Value of property lastReplicaId.

setPrimary

public void setPrimary(java.net.InetSocketAddress primary)
Setter for property primary.

Parameters:
primary - New value of property primary.

getPrimary

public java.net.InetSocketAddress getPrimary()
Getter for property primary.

Returns:
Value of property primary.

setReplicas

public void setReplicas(java.util.LinkedList replicas)
Setter for property replicas.

Parameters:
replicas - New value of property replicas.

getReplicas

public java.util.LinkedList getReplicas()
Getter for property replicas.

Returns:
Value of property replicas.

setState

public void setState(byte state)
Setter for property state.

Parameters:
state - New value of property state.

getState

public byte getState()
Getter for property state.

Returns:
Value of property state.

toString

public java.lang.String toString()
Returns string with description of the object

Overrides:
toString in class Packet
Returns:
Description


Copyright © 2004 Phoenix Team (CMU/AIT). All Rights Reserved.