Example #1
0
 /**
  * This method is called before writing to the map. The default implementation checks whether
  * writing is allowed, and tries to detect concurrent modification.
  *
  * @throws UnsupportedOperationException if the map is read-only, or if another thread is
  *     concurrently writing
  */
 protected void beforeWrite() {
   if (readOnly) {
     checkOpen();
     throw DataUtils.newUnsupportedOperationException("This map is read-only");
   }
   checkConcurrentWrite();
   writing = true;
   store.beforeWrite();
 }