package net.nanopool;

public class DefaultContentionHandler implements ContentionHandler {
    private final boolean printWarning;
    
    public DefaultContentionHandler() {
        this(true);
    }
    
    public DefaultContentionHandler(boolean printWarning) {
        this.printWarning = printWarning;
    }
    
    public void handleContention() {
        if (printWarning)
            System.err.println("PoolingDataSource: contention warning.");
        Thread.yield();
    }
}

package net.nanopool;

public class DefaultContentionHandler implements ContentionHandler {
    
    public void handleContention() {
        System.err.println("PoolingDataSource: contention warning.");
        Thread.yield();
    }
}

--- 
+++ 
@@ -1,9 +1,19 @@
 package net.nanopool;
 
 public class DefaultContentionHandler implements ContentionHandler {
+    private final boolean printWarning;
+    
+    public DefaultContentionHandler() {
+        this(true);
+    }
+    
+    public DefaultContentionHandler(boolean printWarning) {
+        this.printWarning = printWarning;
+    }
     
     public void handleContention() {
-        System.err.println("PoolingDataSource: contention warning.");
+        if (printWarning)
+            System.err.println("PoolingDataSource: contention warning.");
         Thread.yield();
     }
 }
Allow creating it to not be so talkative about contention.
