Code example for ReentrantReadWriteLock

Methods: readLock, writeLock

0
	public static final int TIME_SCROLL_WIDTH = (int) (Global.W_FRAME * Global.SENSOR_SPLIT_RIGHT);
	public static final int TOLERANCE = 50;
	public static final int W_ARROW = 35;
	public static final int TIME_HEIGHT = 20;
 
	private final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock();
	private final Lock rLock = rwl.readLock();
	private final Lock wLock = rwl.writeLock();
 
	private float mPxPerPos;
 
	private int wImage;
	private int hImage;
 
	private BufferedImage mCursorBufferedImage;
	private BufferedImage mStartBufferedImage;
	private BufferedImage mStopBufferedImage;
 
	private SensorsScenarioModel mModel;
 
	private int mDragStart = -1;