public synchronized void setMaxCacheSizeInBytes ( final int newsize ) { if ( validState ) { log . info ( this . getClass ( ) . getName ( ) + "::setMaxCacheSizeInBytes newsize=" + newsize + " flushing write-cache" ) ; privateSync ( true , false ) ; clearReadCaches ( ) ; } if ( newsize >= 1024 ) { // 1KB minimal maxCacheSizeInBytes = newsize ; createReadCaches ( ) ; } }
Clear caches and Set new value of maximal bytes used for nodes in cache .