Class PurgePostedChargeSessionsTask

java.lang.Object
net.solarnetwork.ocpp.dao.PurgePostedChargeSessionsTask
All Implemented Interfaces:
Runnable, Callable<Integer>

public class PurgePostedChargeSessionsTask extends Object implements Callable<Integer>, Runnable
Job to delete old charge sessions that have been uploaded.
Version:
2.0
Author:
matt
  • Field Details

    • DEFAULT_EXPIRATION_HOURS

      public static final int DEFAULT_EXPIRATION_HOURS
      The default expirationHours property value.
      See Also:
  • Constructor Details

    • PurgePostedChargeSessionsTask

      public PurgePostedChargeSessionsTask()
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • call

      public Integer call() throws Exception
      Specified by:
      call in interface Callable<Integer>
      Throws:
      Exception
    • setChargeSessionDao

      public void setChargeSessionDao(net.solarnetwork.service.OptionalService<ChargeSessionDao> chargeSessionDao)
      Set the charge session DAO to use.
      Parameters:
      chargeSessionDao - the DAO to use
    • getExpirationHours

      public int getExpirationHours()
      Get the posted charge session expiration hours.
      Returns:
      the expiration hours
    • setExpirationHours

      public void setExpirationHours(int expirationHours)
      Set the posted charge session expiration hours.
      Parameters:
      expirationHours - the minimum number of hours the posted date a session must have before qualifying for being purged