org.gudy.azureus2.core3.util
Class ConcurrentHasherRequest

java.lang.Object
  extended by org.gudy.azureus2.core3.util.ConcurrentHasherRequest

public class ConcurrentHasherRequest
extends Object

Author:
parg

Constructor Summary
protected ConcurrentHasherRequest(ConcurrentHasher _concurrent_hasher, ByteBuffer _buffer, ConcurrentHasherRequestListener _listener, boolean _low_priorty)
           
 
Method Summary
 void cancel()
          cancel the hash request.
 boolean getCancelled()
           
 byte[] getResult()
          synchronously get the result of the hash - null returned if it is cancelled
 int getSize()
           
 boolean isLowPriority()
           
protected  void run(SHA1Hasher hasher)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcurrentHasherRequest

protected ConcurrentHasherRequest(ConcurrentHasher _concurrent_hasher,
                                  ByteBuffer _buffer,
                                  ConcurrentHasherRequestListener _listener,
                                  boolean _low_priorty)
Method Detail

getResult

public byte[] getResult()
synchronously get the result of the hash - null returned if it is cancelled

Returns:

cancel

public void cancel()
cancel the hash request. If it is cancelled before it is completed then a subsequent call to getResult will return null


getCancelled

public boolean getCancelled()

getSize

public int getSize()

isLowPriority

public boolean isLowPriority()

run

protected void run(SHA1Hasher hasher)