public void validate ( ) throws InvalidStoreConfigException { if ( getSegmentFactory ( ) == null ) { throw new InvalidStoreConfigException ( "Segment factory not found" ) ; } if ( getHashFunction ( ) == null ) { throw new InvalidStoreConfigException ( "Store hash function not found" ) ; } if ( getBatchSize ( ) < StoreParams . BATCH_SIZE_MIN ) { throw new InvalidStoreConfigException ( StoreParams . PARAM_BATCH_SIZE + "=" + getBatchSize ( ) ) ; } if ( getNumSyncBatches ( ) < StoreParams . NUM_SYNC_BATCHES_MIN ) { throw new InvalidStoreConfigException ( StoreParams . PARAM_NUM_SYNC_BATCHES + "=" + getNumSyncBatches ( ) ) ; } if ( getHashLoadFactor ( ) < StoreParams . HASH_LOAD_FACTOR_MIN || getHashLoadFactor ( ) > StoreParams . HASH_LOAD_FACTOR_MAX ) { throw new InvalidStoreConfigException ( StoreParams . PARAM_HASH_LOAD_FACTOR + "=" + getHashLoadFactor ( ) ) ; } if ( getSegmentFileSizeMB ( ) < StoreParams . SEGMENT_FILE_SIZE_MB_MIN || getSegmentFileSizeMB ( ) > StoreParams . SEGMENT_FILE_SIZE_MB_MAX ) { throw new InvalidStoreConfigException ( StoreParams . PARAM_SEGMENT_FILE_SIZE_MB + "=" + getSegmentFileSizeMB ( ) ) ; } if ( getSegmentCompactFactor ( ) < StoreParams . SEGMENT_COMPACT_FACTOR_MIN || getSegmentCompactFactor ( ) > StoreParams . SEGMENT_COMPACT_FACTOR_MAX ) { throw new InvalidStoreConfigException ( StoreParams . PARAM_SEGMENT_COMPACT_FACTOR + "=" + getSegmentCompactFactor ( ) ) ; } }
Checks the validity of this StoreConfig .