CTL.Types
Class rPointer

java.lang.Object
  extended by CTL.Measure
      extended by CTL.Types.rPointer
All Implemented Interfaces:
Writable

public class rPointer
extends Measure
implements Writable

Remote pointer


Field Summary
private  long objID
          ObjectID
private  PeerID pid
          Remote PeerID
private  int refC
          Reference count
 
Constructor Summary
rPointer(long objID, GroupInfo info)
          Generate a new rPointer for an object stored on localhost
rPointer(PeerID pid, long objID)
          Generate a new rPointer
 
Method Summary
 boolean equals(java.lang.Object foo)
          Checks if two objects are equal
 long objID()
          Retrieve the stored objID
 PeerID peerID()
          Retrieve the stored PeerID
 void read(SerialIn in)
          Serial read function
 void setObjID(long objID)
          Set a new ObjectID
 java.lang.String toString()
          Retrieve a String representation of this object
 void write(SerialOut out)
          Serial write function
 
Methods inherited from class CTL.Measure
size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pid

private PeerID pid
Remote PeerID


objID

private long objID
ObjectID


refC

private int refC
Reference count

Constructor Detail

rPointer

public rPointer(PeerID pid,
                long objID)
Generate a new rPointer

Parameters:
pid - Remote pid
objID - ObjectID

rPointer

public rPointer(long objID,
                GroupInfo info)
Generate a new rPointer for an object stored on localhost

Parameters:
objID - ObjectID
info - Group information object
Method Detail

equals

public boolean equals(java.lang.Object foo)
Checks if two objects are equal

Overrides:
equals in class java.lang.Object
Parameters:
foo - Object to compare to
Returns:
True if equal, false otherwise

toString

public java.lang.String toString()
Retrieve a String representation of this object

Overrides:
toString in class java.lang.Object
Returns:
String

objID

public long objID()
Retrieve the stored objID

Returns:
ObjectID

setObjID

public void setObjID(long objID)
Set a new ObjectID

Parameters:
objID - ObjectID

peerID

public PeerID peerID()
Retrieve the stored PeerID

Returns:
PeerID

read

public void read(SerialIn in)
          throws java.io.IOException,
                 java.lang.ClassNotFoundException,
                 java.lang.InstantiationException,
                 java.lang.IllegalAccessException,
                 java.lang.reflect.InvocationTargetException
Serial read function

Specified by:
read in interface Writable
Parameters:
in - Input stream
Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

write

public void write(SerialOut out)
           throws java.io.IOException,
                  java.lang.IllegalAccessException,
                  java.lang.reflect.InvocationTargetException,
                  CTLException
Serial write function

Specified by:
write in interface Writable
Parameters:
out - Output stream
Throws:
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
CTLException