org.resilientedge.jockey.peerbridge
Class PBFindMarker

java.lang.Object
  |
  +--org.resilientedge.jockey.peerbridge.PBFindMarker

public class PBFindMarker
extends java.lang.Object

Marks a current find query for status inqueries.

Version:
$Revision: 1.1.1.1 $
Author:
John Gardner

Field Summary
static int FIND_COMPLETE
          state indicating that the find has completed
static int FIND_TIMEOUT
          state indicating that the find operation timed out
static int FINDING
          state indicating that the find is in progress
 
Constructor Summary
PBFindMarker()
          No-argument constructor.
 
Method Summary
 int compare(PBFindMarker other)
          Returns zero if the other FindMarker is the same as this FindMarker.
 boolean getFindComplete()
          Returns true if the find is complete
 int getFoundSoFar()
          Returns the count of find matches so far.
 int getStatus()
          Returns a status code corresponding to one of the FIND_ constants.
 int getTimeLeft()
          Returns the amount of time left in this find attempt.
 void setFindComplete(boolean complete)
          Set the completion state.
 void setFoundSoFar(int matches)
          Update the number of find matches so far.
 void setStatus(int state)
          Update the find state.
 void setTimeLeft(int timeLeft)
          Set the amount of time left in this find attempt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FINDING

public static final int FINDING
state indicating that the find is in progress

FIND_COMPLETE

public static final int FIND_COMPLETE
state indicating that the find has completed

FIND_TIMEOUT

public static final int FIND_TIMEOUT
state indicating that the find operation timed out
Constructor Detail

PBFindMarker

public PBFindMarker()
No-argument constructor. Automatically obtains a new unique find identifier.
Method Detail

setStatus

public void setStatus(int state)
Update the find state.
Parameters:
state - new find state

setFoundSoFar

public void setFoundSoFar(int matches)
Update the number of find matches so far.
Parameters:
matches - new number of find matches

setFindComplete

public void setFindComplete(boolean complete)
Set the completion state.
Parameters:
complete - the new completion state

setTimeLeft

public void setTimeLeft(int timeLeft)
Set the amount of time left in this find attempt.
Parameters:
timeLeft - the number of seconds left in this search

getStatus

public int getStatus()
Returns a status code corresponding to one of the FIND_ constants.
Returns:
find state

getFoundSoFar

public int getFoundSoFar()
Returns the count of find matches so far.
Returns:
number of matches

getFindComplete

public boolean getFindComplete()
Returns true if the find is complete
Returns:
true if find is complete

getTimeLeft

public int getTimeLeft()
Returns the amount of time left in this find attempt.
Returns:
the number of seconds left in this search

compare

public int compare(PBFindMarker other)
Returns zero if the other FindMarker is the same as this FindMarker.
Parameters:
other - marker to compare
Returns:
a positive or negative integer, or zero


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.