Rice Pastry API

rice.p2p.past.testing
Class DistPastRegrTest.NonOverwritingTestPastContent

java.lang.Object
  |
  +--rice.p2p.past.testing.DistPastRegrTest.TestPastContent
        |
        +--rice.p2p.past.testing.DistPastRegrTest.VersionedTestPastContent
              |
              +--rice.p2p.past.testing.DistPastRegrTest.NonOverwritingTestPastContent
All Implemented Interfaces:
PastContent, java.io.Serializable
Enclosing class:
DistPastRegrTest

protected static class DistPastRegrTest.NonOverwritingTestPastContent
extends DistPastRegrTest.VersionedTestPastContent

See Also:
Serialized Form

Field Summary
 
Fields inherited from class rice.p2p.past.testing.DistPastRegrTest.VersionedTestPastContent
version
 
Fields inherited from class rice.p2p.past.testing.DistPastRegrTest.TestPastContent
existing, id
 
Constructor Summary
DistPastRegrTest.NonOverwritingTestPastContent(Id id, int version)
           
 
Method Summary
 PastContent checkInsert(Id id, PastContent existingContent)
          Checks if a insert operation should be allowed.
 
Methods inherited from class rice.p2p.past.testing.DistPastRegrTest.VersionedTestPastContent
equals, toString
 
Methods inherited from class rice.p2p.past.testing.DistPastRegrTest.TestPastContent
getHandle, getId, isMutable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DistPastRegrTest.NonOverwritingTestPastContent

public DistPastRegrTest.NonOverwritingTestPastContent(Id id,
                                                      int version)
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 DistPastRegrTest.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.
PastException

Rice Pastry API

Copyright © 2001 - Rice Pastry