The following is the typical reader and writer pattern (a lot of reads and few writes)
private ReadWriteLock lock = new ReentrantReadWriteLock();
private
Write locks are actually already prioritized above reader locks.
If a thread wants to read the resource, it is okay as long as no threads are writing to it, and no threads have requested write access to the resource. By up-prioritizing write-access requests we assume that write requests are more important than read-requests.
please refer to this excellent post for more details.
Edit: it is important to note that this holds for the fair mode only. thanks @jtahlborn!