com.metamatrix.common.buffer
Class TupleSourceID

java.lang.Object
  extended by com.metamatrix.common.buffer.TupleSourceID
All Implemented Interfaces:
java.io.Serializable

public class TupleSourceID
extends java.lang.Object
implements java.io.Serializable

Identifier for a tuple source. The tuple source ID contains two pieces of information: a unique ID (unique across locations) and a location. Both must be represented by a string but different systems may use different location descriptions. The com.metamatrix.common.buffer.BufferManagerLookup is the only party responsible for providing and decoding the location string.

See Also:
Serialized Form

Constructor Summary
TupleSourceID(java.lang.String stringID)
          Creates a tuple source ID given a string version of the ID - the location should be encoded within the stringID, in the form :.
TupleSourceID(java.lang.String idValue, java.lang.String location)
          Creates a tuple source ID given a string version of the ID and the location.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares two TupleSourceIDs for equality.
 java.lang.String getIDValue()
          Get unique ID value, does not contain location
 java.lang.String getLocation()
          Get location string
 java.lang.String getStringID()
          Get string combining the unique ID and location in the form : if a location is specified.
 int hashCode()
          Get hash code
 java.lang.String toString()
          Get combined string representation of TupleSourceID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TupleSourceID

public TupleSourceID(java.lang.String stringID)
Creates a tuple source ID given a string version of the ID - the location should be encoded within the stringID, in the form :.

Parameters:
stringID - the String ID; may not be null (zero-length is tolerated)

TupleSourceID

public TupleSourceID(java.lang.String idValue,
                     java.lang.String location)
Creates a tuple source ID given a string version of the ID and the location.

Parameters:
idValue - Unique ID; may not be null (zero-length is tolerated)
location - Location string
Method Detail

getLocation

public java.lang.String getLocation()
Get location string

Returns:
the location; may be null

getIDValue

public java.lang.String getIDValue()
Get unique ID value, does not contain location

Returns:
ID value; never null but possibly zero-length

getStringID

public java.lang.String getStringID()
Get string combining the unique ID and location in the form : if a location is specified. Otherwise, just the idValue is returned.


equals

public boolean equals(java.lang.Object obj)
Compares two TupleSourceIDs for equality.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Other object
Returns:
True if equal

hashCode

public int hashCode()
Get hash code

Overrides:
hashCode in class java.lang.Object
Returns:
hash code

toString

public java.lang.String toString()
Get combined string representation of TupleSourceID

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


Copyright © 2009. All Rights Reserved.