public abstract class ReadWriteTask extends Object
Constructor and Description |
---|
ReadWriteTask() |
Modifier and Type | Method and Description |
---|---|
Object |
doInReadLock(ReadWriteLock lock)
Call invoke() after acquiring a read lock, and then release it.
|
Object |
doInWriteLock(ReadWriteLock lock)
Call invoke() after acquiring a write lock, and then release it.
|
abstract Object |
invoke()
The method will be invoked after acquiring a read-write lock and release the lock after invocation.
|
public abstract Object invoke()
public Object doInWriteLock(ReadWriteLock lock)
public Object doInReadLock(ReadWriteLock lock)
Copyright © 2020. All rights reserved.