public ResourceQueue(final NonBlockingLockManagerWithNewDesign<R> lockService,final R resource){
  if (lockService == null)   throw new IllegalArgumentException();
  if (resource == null)   throw new IllegalArgumentException();
  this.lockService=lockService;
  this.resource=resource;
  this.queue=new LinkedBlockingQueue<T>();
  this.statisticsTask=new QueueSizeMovingAverageTask(resource.toString(),queue);
}

public ResourceQueue ( final NonBlockingLockManagerWithNewDesign < R > lockService , final R resource ) { if ( lockService == null ) throw new IllegalArgumentException ( ) ; if ( resource == null ) throw new IllegalArgumentException ( ) ; this . lockService = lockService ; this . resource = resource ; this . queue = new LinkedBlockingQueue < T > ( ) ; this . statisticsTask = new QueueSizeMovingAverageTask ( resource . toString ( ) , queue ) ; }
create a queue of lock requests for a resource .
