Rice Pastry API

rice.p2p.past.testing
Class RawPastRegrTest.NonOverwritingTestPastContent

java.lang.Object
  extended by rice.p2p.past.testing.RawPastRegrTest.TestPastContent
      extended by rice.p2p.past.testing.RawPastRegrTest.VersionedTestPastContent
          extended by rice.p2p.past.testing.RawPastRegrTest.NonOverwritingTestPastContent
All Implemented Interfaces:
java.io.Serializable, PastContent, RawPastContent
Enclosing class:
RawPastRegrTest

protected static class RawPastRegrTest.NonOverwritingTestPastContent
extends RawPastRegrTest.VersionedTestPastContent

See Also:
Serialized Form

Field Summary
static short TYPE
           
 
Fields inherited from class rice.p2p.past.testing.RawPastRegrTest.VersionedTestPastContent
version
 
Fields inherited from class rice.p2p.past.testing.RawPastRegrTest.TestPastContent
existing, id
 
Constructor Summary
RawPastRegrTest.NonOverwritingTestPastContent(Id id, int version)
           
RawPastRegrTest.NonOverwritingTestPastContent(InputBuffer buf, Endpoint endpoint, PastContentDeserializer pcd)
           
 
Method Summary
 PastContent checkInsert(Id id, PastContent existingContent)
          Checks if a insert operation should be allowed.
 boolean equals(java.lang.Object o)
           
 short getType()
           
 java.lang.String toString()
           
 
Methods inherited from class rice.p2p.past.testing.RawPastRegrTest.VersionedTestPastContent
serialize
 
Methods inherited from class rice.p2p.past.testing.RawPastRegrTest.TestPastContent
getHandle, getId, isMutable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final short TYPE
See Also:
Constant Field Values
Constructor Detail

RawPastRegrTest.NonOverwritingTestPastContent

public RawPastRegrTest.NonOverwritingTestPastContent(Id id,
                                                     int version)

RawPastRegrTest.NonOverwritingTestPastContent

public RawPastRegrTest.NonOverwritingTestPastContent(InputBuffer buf,
                                                     Endpoint endpoint,
                                                     PastContentDeserializer pcd)
                                              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

checkInsert

public PastContent checkInsert(Id id,
                               PastContent existingContent)
                        throws PastException
Description copied from interface: PastContent
Checks if a insert operation should be allowed. Invoked when a Past node receives an insert request and it is a replica root for the id; invoked on the object to be inserted. This method determines the effect of an insert operation on an object that already exists: it computes the new value of the stored object, as a function of the new and the existing object.

Specified by:
checkInsert in interface PastContent
Overrides:
checkInsert in class RawPastRegrTest.TestPastContent
Parameters:
id - the key identifying the object
Returns:
null, if the operation is not allowed; else, the new object to be stored on the local node.
Throws:
PastException

toString

public java.lang.String toString()
Overrides:
toString in class RawPastRegrTest.VersionedTestPastContent

getType

public short getType()
Specified by:
getType in interface RawPastContent
Overrides:
getType in class RawPastRegrTest.VersionedTestPastContent

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class RawPastRegrTest.VersionedTestPastContent

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection