org.openanzo.services.replication
Class ReplicationTransactionUpdate

java.lang.Object
  extended by org.openanzo.services.replication.ReplicationTransactionUpdate

public class ReplicationTransactionUpdate
extends java.lang.Object

This class is used to hold transaction update messages as they come into the client. Each message is stored in a Hashmap of name/value pairs.

Author:
Wing Yung (wingyung@us.ibm.com), Matthew Roy ( mroy@cambridgesemantics.com )

Field Summary
 long currentCommandId
          Id of current command within this transaction
 
Constructor Summary
ReplicationTransactionUpdate(long id, java.lang.Long time)
          Create new ReplicationTransactionUpdate
 
Method Summary
 void addMessage(java.util.HashMap<java.lang.String,java.lang.String> message)
          Add a message to this list of messages.
 long getId()
          Get the transaction id
 java.util.List<java.util.HashMap<java.lang.String,java.lang.String>> getMessages()
          Get the list of messages in this transaction
 java.lang.Long getTransactionTimestamp()
          Get the transactionTimestamp
 boolean isComplete()
          Determine if the transaction is completely received
 void nextCommand(long commandId, java.lang.String commandType)
          Add a new command message to list
 void setComplete(boolean complete)
          Set if this transaction is complete.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentCommandId

public long currentCommandId
Id of current command within this transaction

Constructor Detail

ReplicationTransactionUpdate

public ReplicationTransactionUpdate(long id,
                                    java.lang.Long time)
Create new ReplicationTransactionUpdate

Parameters:
id - Transaction id
time - timestamp of transaction
Method Detail

getMessages

public java.util.List<java.util.HashMap<java.lang.String,java.lang.String>> getMessages()
Get the list of messages in this transaction

Returns:
the list of messages in this transaction

addMessage

public void addMessage(java.util.HashMap<java.lang.String,java.lang.String> message)
Add a message to this list of messages.

Parameters:
message - new message to add to list

nextCommand

public void nextCommand(long commandId,
                        java.lang.String commandType)
Add a new command message to list

Parameters:
commandId - ID of command
commandType - Type of command

getId

public long getId()
Get the transaction id

Returns:
the transaction id

isComplete

public boolean isComplete()
Determine if the transaction is completely received

Returns:
true if the transaction is completely received

setComplete

public void setComplete(boolean complete)
Set if this transaction is complete.

Parameters:
complete - complete or not

getTransactionTimestamp

public java.lang.Long getTransactionTimestamp()
Get the transactionTimestamp

Returns:
the transactionTimestamp


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.