public boolean isSampleWriteLocked(SampleContext sc, Integer sample) throws NoSuchSampleException, NoSuchContextException {
if (s2sc.get(sample) != sc || sc == null)
throw new NoSuchContextException();
RWLock pLock = (RWLock) s2sl.get(sample);
if (pLock == null)
throw new NoSuchSampleException(sample);
return pLock.isWriteLocked();
}