gr.uoa.di.madgik.grs.proxy.mirror
Class PartialRequestEntry

java.lang.Object
  extended by gr.uoa.di.madgik.grs.proxy.mirror.PartialRequestEntry

public class PartialRequestEntry
extends java.lang.Object

This class holds information on a request made by a reader for more data to be provided over a partially transfered record Field. These records are internally managed by the PartialRequestManager and the respective managing IMirror instance

Author:
gpapanikos

Constructor Summary
PartialRequestEntry(long recordIndex, int fieldIndex, IBuffer.TransportOverride override, java.lang.Object notify)
          Creates a new instance for the request based on its details
 
Method Summary
 PartialRequestEntry copy()
          Creates a new instance of the PartialRequestEntry with the same values as the ones available in this instance
 boolean equals(java.lang.Object obj)
          
 int getFieldIndex()
          Retrieved the Field index
 java.lang.Object getNotify()
          Retrieves the synchronization object
 IBuffer.TransportOverride getOverride()
          Retrieves the IBuffer.TransportOverride directive
 long getRecordIndex()
          Retrieved the Record index
 int hashCode()
          
 void setFieldIndex(int fieldIndex)
          Sets the Field index
 void setNotify(java.lang.Object notify)
          Sets the synchronization object
 void setOverride(IBuffer.TransportOverride override)
          Sets the IBuffer.TransportOverride directive
 void setRecordIndex(long recordIndex)
          Sets the Record index
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartialRequestEntry

public PartialRequestEntry(long recordIndex,
                           int fieldIndex,
                           IBuffer.TransportOverride override,
                           java.lang.Object notify)
Creates a new instance for the request based on its details

Parameters:
recordIndex - The Record index
fieldIndex - The Field index
override - The IBuffer.TransportOverride directive
notify - The synchronization object to use to notify the requester
Method Detail

getRecordIndex

public long getRecordIndex()
Retrieved the Record index

Returns:
the Record index

setRecordIndex

public void setRecordIndex(long recordIndex)
Sets the Record index

Parameters:
recordIndex - the Record index

getFieldIndex

public int getFieldIndex()
Retrieved the Field index

Returns:
the Field index

setFieldIndex

public void setFieldIndex(int fieldIndex)
Sets the Field index

Parameters:
fieldIndex - the Field index

getNotify

public java.lang.Object getNotify()
Retrieves the synchronization object

Returns:
the synchronization object

setNotify

public void setNotify(java.lang.Object notify)
Sets the synchronization object

Parameters:
notify - the synchronization object

getOverride

public IBuffer.TransportOverride getOverride()
Retrieves the IBuffer.TransportOverride directive

Returns:
the IBuffer.TransportOverride directive

setOverride

public void setOverride(IBuffer.TransportOverride override)
Sets the IBuffer.TransportOverride directive

Parameters:
override - the IBuffer.TransportOverride directive

equals

public boolean equals(java.lang.Object obj)

the equality operation is based in the Record index and the Field index

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

copy

public PartialRequestEntry copy()
Creates a new instance of the PartialRequestEntry with the same values as the ones available in this instance

Returns:
the new instance

hashCode

public int hashCode()

Since the two key values used for equality are the Record and Field index, the hash code created is based in the Cantor function to create a unique hash value

Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()