org.apache.jdo.impl.fostore
Class RequestId

java.lang.Object
  extended byorg.apache.jdo.impl.fostore.RequestId

class RequestId
extends java.lang.Object

Represents a simple id associated with a request. This is used, for example, to pair up requests and replies: when a Request is written to the store, it is put in a map keyed by RequestId, and when replies are received from the store, they contain a RequestId; this is used to find the corresponding Request which then handles the reply data.

Author:
Dave Bristor

Field Summary
static RequestId FAILURE
           
private  java.lang.Long id
           
private static java.util.HashMap idFactoryTable
           
private static I18NHelper msg
          I18N support.
 
Constructor Summary
(package private) RequestId(java.io.DataInput in)
          Create a new RequestId by reading it's representation from the input.
private RequestId(long id)
           
 
Method Summary
(package private) static RequestId allocate(FOStorePMF pmf)
           
 boolean equals(java.lang.Object other)
          Returns true if the other id is equal to this one.
 int hashCode()
           
 java.lang.String toString()
           
(package private)  void write(java.io.DataOutput out)
          Writes its representation to the output stream.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

idFactoryTable

private static java.util.HashMap idFactoryTable

id

private final java.lang.Long id

FAILURE

public static final RequestId FAILURE

msg

private static final I18NHelper msg
I18N support.

Constructor Detail

RequestId

private RequestId(long id)

RequestId

RequestId(java.io.DataInput in)
    throws java.io.IOException
Create a new RequestId by reading it's representation from the input.

Parameters:
in - DataInput from which representation is read.
Method Detail

write

void write(java.io.DataOutput out)
     throws java.io.IOException
Writes its representation to the output stream.

Parameters:
out - DataOutput stream to which RequestId's representation is written.
Throws:
java.io.IOException

allocate

static RequestId allocate(FOStorePMF pmf)

equals

public boolean equals(java.lang.Object other)
Returns true if the other id is equal to this one.

Parameters:
other - RequestId to which this one is compared.

hashCode

public int hashCode()

toString

public java.lang.String toString()