public synchronized void setStoreFileSize ( long newMinimumStoreFileSize , long newMaximumStoreFileSize ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "setStoreFileSize" , new Object [ ] { new Long ( newMinimumStoreFileSize ) , new Long ( newMaximumStoreFileSize ) } ) ; // Synchronized so we have locked out flush(); if ( newMinimumStoreFileSize > newMaximumStoreFileSize ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "setStoreFileSize" ) ; throw new IllegalArgumentException ( newMinimumStoreFileSize + ">" + newMaximumStoreFileSize ) ; } // if (newStoreFileSize... // Check that the new MaximumStoreFileSize is still bigger than the existing // contents if the ObjectStore. if ( newMaximumStoreFileSize < storeFileSizeUsed ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "setStoreFileSize" , new Object [ ] { new Long ( newMaximumStoreFileSize ) , new Long ( storeFileSizeAllocated ) , new Long ( storeFileSizeUsed ) } ) ; throw new StoreFileSizeTooSmallException ( this , newMaximumStoreFileSize , storeFileSizeAllocated , storeFileSizeUsed ) ; } // if (newStoreFileSize... // If we are expanding the minimum file size grab the disk space now. // If we fail before storing the new administered values the space will be release next time // we open(). if ( newMinimumStoreFileSize > storeFileSizeAllocated ) { try { setStoreFileSizeInternalWithException ( newMinimumStoreFileSize ) ; } catch ( java . io . IOException exception ) { // No FFDC Code Needed. ObjectManager . ffdc . processException ( this , cclass , "setStoreFileSize" , exception , "1:349:1.57" ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "setStoreFileSize" ) ; throw new PermanentIOException ( this , exception ) ; } } // if ( newMinimumStoreFileSize > storeFileSizeAllocated). minimumStoreFileSize = newMinimumStoreFileSize ; maximumStoreFileSize = newMaximumStoreFileSize ; writeHeader ( ) ; force ( ) ; setAllocationAllowed ( ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "setStoreFileSize" ) ; }
Sets the size of the store file to the new values . At least the minimum space is reserved in the file system . No more than the maximum number of bytes will be used . Blocks until this has completed . The initial values used by the ObjecStore are 0 and Long . MAX_VAULE . The store will attempt to release space as ManagedObjects are deleted to reach the minimum size .