/** * This delegates to the generic JDBC disk cache. If we are currently optimizing, then this * method will balk and do nothing. * <p> * @param element */ @Override protected void processUpdate( ICacheElement<K, V> element ) { if ( this.getTableState().getState() == TableState.OPTIMIZATION_RUNNING ) { if ( this.mySQLDiskCacheAttributes.isBalkDuringOptimization() ) { return; } } super.processUpdate( element ); }
/** * This delegates to the generic JDBC disk cache. If we are currently optimizing, then this * method will balk and do nothing. * <p> * @param element */ @Override protected void processUpdate( ICacheElement<K, V> element ) { if ( this.getTableState().getState() == TableState.OPTIMIZATION_RUNNING ) { if ( this.mySQLDiskCacheAttributes.isBalkDuringOptimization() ) { return; } } super.processUpdate( element ); }
/** * This delegates to the generic JDBC disk cache. If we are currently optimizing, then this * method will balk and return null. * <p> * @param pattern used for like query. * @return An object matching key, or null. */ @Override protected Map<K, ICacheElement<K, V>> processGetMatching( String pattern ) { if ( this.getTableState().getState() == TableState.OPTIMIZATION_RUNNING ) { if ( this.mySQLDiskCacheAttributes.isBalkDuringOptimization() ) { return null; } } return super.processGetMatching( pattern ); }
/** * This delegates to the generic JDBC disk cache. If we are currently optimizing, then this * method will balk and return null. * <p> * @param key Key to locate value for. * @return An object matching key, or null. */ @Override protected ICacheElement<K, V> processGet( K key ) { if ( this.getTableState().getState() == TableState.OPTIMIZATION_RUNNING ) { if ( this.mySQLDiskCacheAttributes.isBalkDuringOptimization() ) { return null; } } return super.processGet( key ); }
/** * Removed the expired. (now - create time) > max life seconds * 1000 * <p> * If we are currently optimizing, then this method will balk and do nothing. * <p> * TODO consider blocking and trying again. * <p> * @return the number deleted */ @Override protected int deleteExpired() { if ( this.getTableState().getState() == TableState.OPTIMIZATION_RUNNING ) { if ( this.mySQLDiskCacheAttributes.isBalkDuringOptimization() ) { return -1; } } return super.deleteExpired(); } }
/** * This delegates to the generic JDBC disk cache. If we are currently optimizing, then this * method will balk and return null. * <p> * @param key Key to locate value for. * @return An object matching key, or null. */ @Override protected ICacheElement<K, V> processGet( K key ) { if ( this.getTableState().getState() == TableState.OPTIMIZATION_RUNNING ) { if ( this.mySQLDiskCacheAttributes.isBalkDuringOptimization() ) { return null; } } return super.processGet( key ); }
/** * This delegates to the generic JDBC disk cache. If we are currently optimizing, then this * method will balk and return null. * <p> * @param pattern used for like query. * @return An object matching key, or null. */ @Override protected Map<K, ICacheElement<K, V>> processGetMatching( String pattern ) { if ( this.getTableState().getState() == TableState.OPTIMIZATION_RUNNING ) { if ( this.mySQLDiskCacheAttributes.isBalkDuringOptimization() ) { return null; } } return super.processGetMatching( pattern ); }
/** * Removed the expired. (now - create time) > max life seconds * 1000 * <p> * If we are currently optimizing, then this method will balk and do nothing. * <p> * TODO consider blocking and trying again. * <p> * @return the number deleted */ @Override protected int deleteExpired() { if ( this.getTableState().getState() == TableState.OPTIMIZATION_RUNNING ) { if ( this.mySQLDiskCacheAttributes.isBalkDuringOptimization() ) { return -1; } } return super.deleteExpired(); } }