Here you can find the source of isRepair()
private static boolean isRepair()
//package com.java2s; //License from project: Open Source License import java.util.concurrent.locks.ReentrantLock; public class Main { private static final ReentrantLock updateLock = new ReentrantLock(); private static boolean isRepair() { return updateLock.isHeldByCurrentThread(); }//w w w . j ava2 s .co m }