h2/src/main/org/h2/mvstore/MVMap.java
/**
     * 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
     */
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
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 (closed) {
            throw DataUtils.newIllegalStateException(
                    DataUtils.ERROR_CLOSED, "This map is closed");
        }
        if (readOnly) {
            throw DataUtils.newUnsupportedOperationException(
                    "This map is read-only");
        }
        checkConcurrentWrite();
        store.beforeWrite();
        currentWriteVersion = writeVersion;
    }
protected void beforeWrite ( ) { if ( closed ) { throw DataUtils . newIllegalStateException ( DataUtils . ERROR_CLOSED , "This map is closed" ) ; } if ( readOnly ) { throw DataUtils . newUnsupportedOperationException ( "This map is read-only" ) ; } checkConcurrentWrite ( ) ; store . beforeWrite ( ) ; currentWriteVersion = writeVersion ; }
This method is called before writing to the map.
This method is called before writing to the map .