Class ConcurrentHasher

java.lang.Object
com.biglybt.core.util.ConcurrentHasher

public class ConcurrentHasher extends Object
  • Field Details

  • Constructor Details

    • ConcurrentHasher

      protected ConcurrentHasher()
  • Method Details

    • getSingleton

      public static ConcurrentHasher getSingleton()
    • concurrentHashingAvailable

      public static boolean concurrentHashingAvailable()
    • addRequest

      public ConcurrentHasherRequest addRequest(ByteBuffer buffer, int hash_version, int piece_size, long v2_file_size)
      add a synchronous request - on return it will have run (or been cancelled)
    • addRequest

      public ConcurrentHasherRequest addRequest(ByteBuffer buffer, int hash_version, int piece_size, long v2_file_size, ConcurrentHasherRequestListener listener, boolean low_priorty)
      Add an asynchronous request if listener supplied, sync otherwise
      Parameters:
      buffer -
      listener -
      low_priorty - low priority checks will cause the "friendly hashing" setting to be taken into account
      priority -
      Returns:
    • main

      public static void main(String[] args)