Core Java

Java Lock Example

In this article, we are going to explain Java Lock through Examples.

1. Introduction

Java provides java.util.concurrent package to improve the performance. But, the concurrent execution introduces race condition, deadlock, and dirty-read issues due to multiple threads access the same shared resource. Lucky, Java also provides a Lock interface and ReentrantLock, ReentrantReadWriteLock, etc classes to address these issues. In this example, I will demonstrate the following items:

  • How to avoid race condition with the synchronized keyword.
  • How to avoid race condition with the Lock interface.

2. Technologies Used

The example code in this article was built and run using:

  • Java 11
  • Maven 3.3.9
  • Eclipse Oxygen
  • Logback 1.2.3

3. Maven Project

3.1 Dependencies

I will include Logback in the pom.xml.

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.jcg.example</groupId>
	<artifactId>lock-example</artifactId>
	<packaging>jar</packaging>
	<version>1.0</version>
	<name>Lock  Example Code</name>
	<build>
		<sourceDirectory>src</sourceDirectory>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<release>11</release>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-access</artifactId>
			<version>1.2.3</version>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.2.3</version>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
			<version>1.2.3</version>
		</dependency>
	</dependencies>
</project>

3.2 SumTask

In this step, I will create a SumTask class which calculates the total value. It increases the total value by one with each invocation. I will use it as a shared resource among concurrent threads.

It has two methods:

  • sum() – calculates the total value.
  • synchronizedSum() – is same as the sum() method but with synchronized keyword.

SumTask.java

package org.jcg.zheng;

public class SumTask {

	private int total = 0;

	public synchronized void synchronizedSum() {
		setTotal(getTotal() + 1);
	}

	public void sum() {
		setTotal(getTotal() + 1);
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

}

3.3 LockedService

In this step, I will create a LockedService class which has two data members and one method:

  • queueLock – a lock object which ensures only one thread to get the lock before entering the protected code.
  • task – a SumTask object instance whose sum() method need to be guarded.
  • foo – this is the demonstration method which guarantees that only one thread can access the task.sum() method at any time. First, it checks if can be locked with the tryLock() method. Second, it obtains a lock by invoking lock() and then calculates the total value. Lastly, it releases the lock by invoking the unlock() method.

LockedService.java

package org.jcg.zheng;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * the code which manipulates the shared resource is surrounded by lock() and
 * unlock() methods the current thread obtains a local and blocks all other
 * threads which are trying to lock the shared resource
 * 
 */
public class LockedService {
	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	private final Lock queueLock;

	private SumTask task;

	public LockedService(Lock lock, SumTask task) {
		super();

		this.queueLock = lock;
		this.task = task;
	}

	public void foo() {
		boolean isDone = false;

		while (!isDone) {
			boolean isfree;
			try {
				isfree = queueLock.tryLock(3, TimeUnit.MINUTES);
				if (isfree) {
					try {

						// lock starts
						queueLock.lock();
						task.sum();
					} finally {
						// unlock
						queueLock.unlock();
					}
					isDone = true;
					logger.info("LockedService:foo completed.");
				} else {
					logger.info("LockedService:foo is locked by other threads. wait for 1 second");
					try {
						Thread.sleep(1000);
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
				}
			} catch (InterruptedException e1) {
				e1.printStackTrace();
			} finally {
				queueLock.unlock();
			}

		}

	}

	public SumTask getTask() {
		return task;
	}

	public void setTask(SumTask task) {
		this.task = task;
	}
}
  • line 35: check with tryLock() before locking it.
  • line 40: lock it.
  • line 44: unlock it.
  • line 59: unlock it.

3.4 SumTaskRunnable

In this step, I will create a SumTaskRunnable class which implements Runnable, so it can be executed concurrently. It has two data members and one method:

  • isSynchronized – a boolean value to determine which sum() method to use.
  • task – a Sumtask object which is passed in via a constructor.
  • run – calculates the sum value by invoking task.synchronizedSum or task.sum() method.

SumTaskRunnable.java

package org.jcg.zheng.concurrent;

import org.jcg.zheng.SumTask;

public class SumTaskRunnable implements Runnable {

	private SumTask task;
	boolean isSynchronized;

	public SumTaskRunnable(SumTask job, boolean isSynchronized) {
		super();
		this.task = job;
		this.isSynchronized = isSynchronized;
	}

	@Override
	public void run() {
		if (isSynchronized) {
			task.synchronizedSum();
		} else {
			task.sum();
		}
	}

}

3.5 LockedServiceRunnable

In this step, I will create a LockedServiceRunnable which wraps the LockedService as a Runnable task, so it can be submitted for a concurrent execution.

LockedServiceRunnable.java

package org.jcg.zheng.concurrent;

import org.jcg.zheng.LockedService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LockedServiceRunnable implements Runnable {
	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	private LockedService lockedService;

	public LockedServiceRunnable(LockedService job) {
		super();
		lockedService = job;
	}

	@Override
	public void run() {
		logger.info("LockedServiceRunnable starts.");

		lockedService.foo();

		logger.info("LockedServiceRunnable ends.");

	}

}

4. Demo

4.1 Not Using Lock Demo

In this step, I will create a NotUsingLockDemo class which calculates the sum from 1000 ones without using Lock. The main execution method reads the isSynchornized flag from the program’s argument, then submits 1000 SumTaskRunnable task to a thread pool for a execution. Finally, it prints out the total value after all threads complete.

NotUsingLockDemo.java

package org.jcg.zheng.concurrent;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

import org.jcg.zheng.SumTask;

public class NotUsingLockDemo {

	public static void main(String[] args) {
		boolean isSynchronized = false;
		if (args != null && args.length > 0 && "true".equalsIgnoreCase(args[0])) {
			isSynchronized = true;
		}
		
		SumTask sharedResource = new SumTask();
		
		ExecutorService executor = Executors.newFixedThreadPool(3);

		for (int i = 0; i < 1000; i++) {
			executor.execute(new SumTaskRunnable(sharedResource, isSynchronized));
		}

		// Shutdown the ExecutorService
		executor.shutdown();

		try {
			executor.awaitTermination(1, TimeUnit.MINUTES);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}

		System.out.println("NoLockDemo::main completed. " + sharedResource.getTotal());

	}

}

Execute it with isSynchornized = false and capture the output.

Output

C:\MaryZheng\Workspaces\jcg-lock-example\target\classes>java org.jcg.zheng.concurrent.NotUsingLockDemo
NoLockDemo::main completed. 998

As you seen from the output, the total value is not always 1000. The total values varies at each execution as some thread’s result get overwritten by other thread.

Execute it with isSynchornized = true and capture the output.

Output

C:\MaryZheng\Workspaces\jcg-lock-example\target\classes>java org.jcg.zheng.concurrent.NotUsingLockDemo true
NoLockDemo::main completed. 1000

As you seen from the output, the total stays with corrected 1000 regardless how many times you execute.

4.2 ReentrantLock Demo

In this step, I will create a ReentrantLockDemo class which submits LockedServicerunnable 1000 times and prints out the total after all the threads completes.

ReentrantLockDemp\o.java

package org.jcg.zheng.concurrent;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantLock;

import org.jcg.zheng.LockedService;
import org.jcg.zheng.SumTask;

public class ReentrantLockDemo {

	public static void main(String[] args) {
		SumTask sharedResource = new SumTask();
		
		LockedService lockedService = new LockedService(new ReentrantLock(), sharedResource);

		ExecutorService executor = Executors.newFixedThreadPool(3);
		for (int i = 0; i < 1000; i++) {
			executor.execute(new LockedServiceRunnable(lockedService));
		}

		// Shutdown the ExecutorService
		executor.shutdown();

		try {
			executor.awaitTermination(1, TimeUnit.MINUTES);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println("ReentrantLockDemo::main completed. " + sharedResource.getTotal());

	}

}

Execute it as a Java application in Eclipse and capture the output here.

Output

21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.398 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.399 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.400 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.402 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.402 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.403 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.404 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.405 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.406 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.407 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.887 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.887 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.887 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.887 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.888 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.888 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.889 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.889 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.889 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.890 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.890 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.891 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.891 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.891 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.891 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.891 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.891 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.891 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.891 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.892 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.892 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.894 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.895 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.896 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.897 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.898 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.892 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.898 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.898 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.898 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.899 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.899 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.899 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.899 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.899 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.900 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.900 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.900 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.900 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.900 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.902 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.902 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.902 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.902 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.902 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.902 [pool-1-thread-2] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.902 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.902 [pool-1-thread-2] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.902 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.902 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.902 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable starts.
21:18:40.902 [pool-1-thread-3] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.902 [pool-1-thread-3] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.LockedService - LockedService:foo completed.
21:18:40.902 [pool-1-thread-1] INFO org.jcg.zheng.concurrent.LockedServiceRunnable - LockedServiceRunnable ends.
ReentrantLockDemo::main completed. 1000

As you seen from the output, the total value is the corrected 1000 for every execution.

5. Summary

In this example, I demonstrated how to use the Lock interface and ReentrantLock class to ensure that only one thread can access the shared resource. The synchronized keyword achieves the same effort but lacking of control on when to lock and unlock.

6. Download the Source Code

Download
You can download the full source code of this example here: Java Lock Example

Mary Zheng

Mary has graduated from Mechanical Engineering department at ShangHai JiaoTong University. She also holds a Master degree in Computer Science from Webster University. During her studies she has been involved with a large number of projects ranging from programming and software engineering. She works as a senior Software Engineer in the telecommunications sector where she acts as a leader and works with others to design, implement, and monitor the software solution.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to top button