CE-978 - Moving from 6 hours to 5 hours for clean hours in addition to running every 30min. Also added status to interface.

This commit is contained in:
t-samples
2024-04-08 12:22:25 -05:00
parent 9ab5a8b305
commit b0a4ea39d0
3 changed files with 31 additions and 2 deletions

View File

@ -46,8 +46,8 @@ public class InMemoryStateProvider implements StateProviderInterface
private final Map<AbstractStateKey, Object> map; private final Map<AbstractStateKey, Object> map;
private static int jobPeriodSeconds = 60 * 60; // 1 hour private static int jobPeriodSeconds = 60 * 30; // 30 minutes
private static int cleanHours = 6; private static int cleanHours = 5;
private static int jobInitialDelay = 60 * 60 * cleanHours; private static int jobInitialDelay = 60 * 60 * cleanHours;
@ -151,6 +151,18 @@ public class InMemoryStateProvider implements StateProviderInterface
/*******************************************************************************
** Get the current status
*
*******************************************************************************/
@Override
public String status()
{
return ("InMemoryStateProvider map size: " + map.size());
}
/******************************************************************************* /*******************************************************************************
** Clean entries that started before the given Instant ** Clean entries that started before the given Instant
* *

View File

@ -59,6 +59,11 @@ public interface StateProviderInterface
*******************************************************************************/ *******************************************************************************/
void remove(AbstractStateKey key); void remove(AbstractStateKey key);
/*******************************************************************************
** Get the current status
*******************************************************************************/
String status();
/******************************************************************************* /*******************************************************************************
** Clean entries that started before the given Instant ** Clean entries that started before the given Instant
*******************************************************************************/ *******************************************************************************/

View File

@ -127,6 +127,18 @@ public class TempFileStateProvider implements StateProviderInterface
/*******************************************************************************
** Get the current status
*
*******************************************************************************/
@Override
public String status()
{
return ("TempFileStateProvider status not supported");
}
/******************************************************************************* /*******************************************************************************
** Clean entries that started before the given Instant ** Clean entries that started before the given Instant
*******************************************************************************/ *******************************************************************************/