Code example for ReentrantReadWriteLock

Methods: readLockwriteLock

	public static final String DEBUG_OPTION = BeansCorePlugin.PLUGIN_ID + "/model/metadata/debug";
	public static final boolean DEBUG = SpringCore.isDebug(DEBUG_OPTION);
	private final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock();
	private final Lock r = rwl.readLock();
	private final Lock w = rwl.writeLock();
	private Map<String, BeanMetadataHolder> beanMetadata = new ConcurrentHashMap<String, BeanMetadataHolder>();
	private Map<String, BeanPropertyDataHolder> beanPropertyData = new ConcurrentHashMap<String, BeanPropertyDataHolder>();
	public Set<IBeanMetadata> getBeanMetadata(IBean bean) {
		try { 
			if (beanMetadata.containsKey(bean.getElementID())) {
				return beanMetadata.get(bean.getElementID()).getBeanMetaData();
Connect your IDE to all the code out there  Get Codota for Java