Ejemplo n.º 1
0
 /** Try to acquire sync before a reader operation; record failure * */
 protected boolean beforeRead() {
   try {
     rd_.acquire();
     return false;
   } catch (InterruptedException ex) {
     syncFailures_.increment();
     return true;
   }
 }
Ejemplo n.º 2
0
 /** Return the number of synchronization failures for read-only operations */
 public long syncFailures() {
   return syncFailures_.get();
 }