public void initHistoryRemovalTimeStrategy() { if (historyRemovalTimeStrategy == null) { historyRemovalTimeStrategy = HISTORY_REMOVAL_TIME_STRATEGY_END; } if (!HISTORY_REMOVAL_TIME_STRATEGY_START.equals(historyRemovalTimeStrategy) && !HISTORY_REMOVAL_TIME_STRATEGY_END.equals(historyRemovalTimeStrategy) && !HISTORY_REMOVAL_TIME_STRATEGY_NONE.equals(historyRemovalTimeStrategy)) { throw LOG.invalidPropertyValue("historyRemovalTimeStrategy", String.valueOf(historyRemovalTimeStrategy), String.format("history removal time strategy must be set to '%s', '%s' or '%s'", HISTORY_REMOVAL_TIME_STRATEGY_START, HISTORY_REMOVAL_TIME_STRATEGY_END, HISTORY_REMOVAL_TIME_STRATEGY_NONE)); } }
public void initHistoryRemovalTimeStrategy() { if (historyRemovalTimeStrategy == null) { historyRemovalTimeStrategy = HISTORY_REMOVAL_TIME_STRATEGY_END; } if (!HISTORY_REMOVAL_TIME_STRATEGY_START.equals(historyRemovalTimeStrategy) && !HISTORY_REMOVAL_TIME_STRATEGY_END.equals(historyRemovalTimeStrategy) && !HISTORY_REMOVAL_TIME_STRATEGY_NONE.equals(historyRemovalTimeStrategy)) { throw LOG.invalidPropertyValue("historyRemovalTimeStrategy", String.valueOf(historyRemovalTimeStrategy), String.format("history removal time strategy must be set to '%s', '%s' or '%s'", HISTORY_REMOVAL_TIME_STRATEGY_START, HISTORY_REMOVAL_TIME_STRATEGY_END, HISTORY_REMOVAL_TIME_STRATEGY_NONE)); } }
protected void initHistoryCleanupStrategy() { if (historyCleanupStrategy == null) { historyCleanupStrategy = HISTORY_CLEANUP_STRATEGY_REMOVAL_TIME_BASED; } if (!HISTORY_CLEANUP_STRATEGY_REMOVAL_TIME_BASED.equals(historyCleanupStrategy) && !HISTORY_CLEANUP_STRATEGY_END_TIME_BASED.equals(historyCleanupStrategy)) { throw LOG.invalidPropertyValue("historyCleanupStrategy", String.valueOf(historyCleanupStrategy), String.format("history cleanup strategy must be either set to '%s' or '%s'", HISTORY_CLEANUP_STRATEGY_REMOVAL_TIME_BASED, HISTORY_CLEANUP_STRATEGY_END_TIME_BASED)); } if (HISTORY_CLEANUP_STRATEGY_REMOVAL_TIME_BASED.equals(historyCleanupStrategy) && HISTORY_REMOVAL_TIME_STRATEGY_NONE.equals(historyRemovalTimeStrategy)) { throw LOG.invalidPropertyValue("historyRemovalTimeStrategy", String.valueOf(historyRemovalTimeStrategy), String.format("history removal time strategy cannot be set to '%s' in conjunction with '%s' history cleanup strategy", HISTORY_REMOVAL_TIME_STRATEGY_NONE, HISTORY_CLEANUP_STRATEGY_REMOVAL_TIME_BASED)); } }
protected void initHistoryCleanupStrategy() { if (historyCleanupStrategy == null) { historyCleanupStrategy = HISTORY_CLEANUP_STRATEGY_REMOVAL_TIME_BASED; } if (!HISTORY_CLEANUP_STRATEGY_REMOVAL_TIME_BASED.equals(historyCleanupStrategy) && !HISTORY_CLEANUP_STRATEGY_END_TIME_BASED.equals(historyCleanupStrategy)) { throw LOG.invalidPropertyValue("historyCleanupStrategy", String.valueOf(historyCleanupStrategy), String.format("history cleanup strategy must be either set to '%s' or '%s'", HISTORY_CLEANUP_STRATEGY_REMOVAL_TIME_BASED, HISTORY_CLEANUP_STRATEGY_END_TIME_BASED)); } if (HISTORY_CLEANUP_STRATEGY_REMOVAL_TIME_BASED.equals(historyCleanupStrategy) && HISTORY_REMOVAL_TIME_STRATEGY_NONE.equals(historyRemovalTimeStrategy)) { throw LOG.invalidPropertyValue("historyRemovalTimeStrategy", String.valueOf(historyRemovalTimeStrategy), String.format("history removal time strategy cannot be set to '%s' in conjunction with '%s' history cleanup strategy", HISTORY_REMOVAL_TIME_STRATEGY_NONE, HISTORY_CLEANUP_STRATEGY_REMOVAL_TIME_BASED)); } }
private void initEndTimeAsDate() { try { endTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(endTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("endTime", endTime); } }
private void initHistoryCleanupBatchWindowEndTime() { try { historyCleanupBatchWindowEndTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(historyCleanupBatchWindowEndTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("historyCleanupBatchWindowEndTime", historyCleanupBatchWindowEndTime); } }
private void initHistoryCleanupBatchWindowStartTime() { try { historyCleanupBatchWindowStartTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(historyCleanupBatchWindowStartTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("historyCleanupBatchWindowStartTime", historyCleanupBatchWindowStartTime); } }
private void initStartTimeAsDate() { try { startTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(startTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("startTime", startTime); } }
private void initHistoryCleanupBatchWindowEndTime() { try { historyCleanupBatchWindowEndTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(historyCleanupBatchWindowEndTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("historyCleanupBatchWindowEndTime", historyCleanupBatchWindowEndTime); } }
private void initHistoryCleanupBatchWindowStartTime() { try { historyCleanupBatchWindowStartTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(historyCleanupBatchWindowStartTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("historyCleanupBatchWindowStartTime", historyCleanupBatchWindowStartTime); } }
private void initStartTimeAsDate() { try { startTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(startTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("startTime", startTime); } }
private void initEndTimeAsDate() { try { endTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(endTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("endTime", endTime); } }
public void initHistoryCleanup() { initHistoryCleanupStrategy(); //validate number of threads if (historyCleanupDegreeOfParallelism < 1 || historyCleanupDegreeOfParallelism > MAX_THREADS_NUMBER) { throw LOG.invalidPropertyValue("historyCleanupDegreeOfParallelism", String.valueOf(historyCleanupDegreeOfParallelism), String.format("value for number of threads for history cleanup should be between 1 and %s", HistoryCleanupCmd.MAX_THREADS_NUMBER)); } if (historyCleanupBatchWindowStartTime != null) { initHistoryCleanupBatchWindowStartTime(); } if (historyCleanupBatchWindowEndTime != null) { initHistoryCleanupBatchWindowEndTime(); } initHistoryCleanupBatchWindowsMap(); if (historyCleanupBatchSize > HistoryCleanupHandler.MAX_BATCH_SIZE || historyCleanupBatchSize <= 0) { throw LOG.invalidPropertyValue("historyCleanupBatchSize", String.valueOf(historyCleanupBatchSize), String.format("value for batch size should be between 1 and %s", HistoryCleanupHandler.MAX_BATCH_SIZE)); } if (historyCleanupBatchThreshold < 0) { throw LOG.invalidPropertyValue("historyCleanupBatchThreshold", String.valueOf(historyCleanupBatchThreshold), "History cleanup batch threshold cannot be negative."); } initBatchOperationsHistoryTimeToLive(); }
public void initHistoryCleanup() { initHistoryCleanupStrategy(); //validate number of threads if (historyCleanupDegreeOfParallelism < 1 || historyCleanupDegreeOfParallelism > MAX_THREADS_NUMBER) { throw LOG.invalidPropertyValue("historyCleanupDegreeOfParallelism", String.valueOf(historyCleanupDegreeOfParallelism), String.format("value for number of threads for history cleanup should be between 1 and %s", HistoryCleanupCmd.MAX_THREADS_NUMBER)); } if (historyCleanupBatchWindowStartTime != null) { initHistoryCleanupBatchWindowStartTime(); } if (historyCleanupBatchWindowEndTime != null) { initHistoryCleanupBatchWindowEndTime(); } initHistoryCleanupBatchWindowsMap(); if (historyCleanupBatchSize > HistoryCleanupHandler.MAX_BATCH_SIZE || historyCleanupBatchSize <= 0) { throw LOG.invalidPropertyValue("historyCleanupBatchSize", String.valueOf(historyCleanupBatchSize), String.format("value for batch size should be between 1 and %s", HistoryCleanupHandler.MAX_BATCH_SIZE)); } if (historyCleanupBatchThreshold < 0) { throw LOG.invalidPropertyValue("historyCleanupBatchThreshold", String.valueOf(historyCleanupBatchThreshold), "History cleanup batch threshold cannot be negative."); } initBatchOperationsHistoryTimeToLive(); }
ParseUtil.parseHistoryTimeToLive(batchOperationHistoryTimeToLive); } catch (Exception e) { throw LOG.invalidPropertyValue("batchOperationHistoryTimeToLive", batchOperationHistoryTimeToLive, e); ParseUtil.parseHistoryTimeToLive(timeToLive); } catch (Exception e) { throw LOG.invalidPropertyValue("history time to live for " + batchOperation + " batch operations", timeToLive, e);
ParseUtil.parseHistoryTimeToLive(batchOperationHistoryTimeToLive); } catch (Exception e) { throw LOG.invalidPropertyValue("batchOperationHistoryTimeToLive", batchOperationHistoryTimeToLive, e); ParseUtil.parseHistoryTimeToLive(timeToLive); } catch (Exception e) { throw LOG.invalidPropertyValue("history time to live for " + batchOperation + " batch operations", timeToLive, e);
public void initHistoryRemovalTimeStrategy() { if (historyRemovalTimeStrategy == null) { historyRemovalTimeStrategy = HISTORY_REMOVAL_TIME_STRATEGY_END; } if (!HISTORY_REMOVAL_TIME_STRATEGY_START.equals(historyRemovalTimeStrategy) && !HISTORY_REMOVAL_TIME_STRATEGY_END.equals(historyRemovalTimeStrategy) && !HISTORY_REMOVAL_TIME_STRATEGY_NONE.equals(historyRemovalTimeStrategy)) { throw LOG.invalidPropertyValue("historyRemovalTimeStrategy", String.valueOf(historyRemovalTimeStrategy), String.format("history removal time strategy must be set to '%s', '%s' or '%s'", HISTORY_REMOVAL_TIME_STRATEGY_START, HISTORY_REMOVAL_TIME_STRATEGY_END, HISTORY_REMOVAL_TIME_STRATEGY_NONE)); } }
private void initEndTimeAsDate() { try { endTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(endTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("endTime", endTime); } }
private void initStartTimeAsDate() { try { startTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(startTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("startTime", startTime); } }
private void initHistoryCleanupBatchWindowEndTime() { try { historyCleanupBatchWindowEndTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(historyCleanupBatchWindowEndTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("historyCleanupBatchWindowEndTime", historyCleanupBatchWindowEndTime); } }