1 package org.jboss.cache.lock; 2 3 import java.util.Date ; 4 import java.util.concurrent.TimeUnit ; 5 import java.util.concurrent.locks.Condition ; 6 import java.util.concurrent.locks.Lock ; 7 8 class NullLock implements Lock , Condition { 9 10 public void lock() 11 { 12 } 13 14 public void lockInterruptibly() throws InterruptedException 15 { 16 } 17 18 public Condition newCondition() 19 { 20 return this; 21 } 22 23 public boolean tryLock() 24 { 25 return true; 26 } 27 28 public boolean tryLock(long arg0, TimeUnit arg1) throws InterruptedException 29 { 30 return true; 31 } 32 33 public void unlock() 34 { 35 } 36 37 public void await() throws InterruptedException 38 { 39 } 40 41 public boolean await(long arg0, TimeUnit arg1) throws InterruptedException 42 { 43 return true; 44 } 45 46 public long awaitNanos(long arg0) throws InterruptedException 47 { 48 return arg0; 49 } 50 51 public void awaitUninterruptibly() 52 { 53 } 54 55 public boolean awaitUntil(Date arg0) throws InterruptedException 56 { 57 return true; 58 } 59 60 public void signal() 61 { 62 } 63 64 public void signalAll() 65 { 66 } 67 } 68 | Popular Tags |