code: public synchronized boolean tryConsume(long numTokens)
    {
      checkArgument(numTokens > 0, "Number of tokens to consume must be positive");
      checkArgument(numTokens <= capacity, "Number of tokens to consume must be less than the capacity of the bucket.");
  
      refill(refillStrategy.refill());
  
      // Now try to consume some tokens
      if (numTokens <= size) {
        size -= numTokens;
        return true;
      }
  
      return false;
    }
docs: Attempt to consume a specified number of tokens from the bucket.  If the tokens were consumed then {@code true}
  is returned, otherwise {@code false} is returned.
  
  @param numTokens The number of tokens to consume from the bucket, must be a positive number.
  @return {@code true} if the tokens were consumed, {@code false} otherwise.