This class provides shared or exclusive access to a ressource.
It preferes the exclusive access, i.e. if threads are waiting for
exclusive access, shared locks can't be gained.
author: Nicolas Noffke author: $Id: ResourceLock.java,v 1.3 2004/05/06 12:39:59 nicolas Exp $