Class PeriodicWriteWorker


  • public class PeriodicWriteWorker
    extends java.lang.Object
    This worker combines writes to lastMessage and lastUpdate fields, to avoid DDOSing Odoo/Postgres by writing too often.
    • Constructor Detail

      • PeriodicWriteWorker

        public PeriodicWriteWorker​(PostgresHandler parent,
                                   com.zaxxer.hikari.HikariDataSource dataSource)
    • Method Detail

      • onLastMessage

        public void onLastMessage​(MyEdge edge)
        Called on Edge onSetLastMessage event.
        Parameters:
        edge - the MyEdge.
      • onLastUpdate

        public void onLastUpdate​(MyEdge edge)
        Called on Edge onSetLastUpdate event.
        Parameters:
        edge - the MyEdge.
      • isOnline

        public void isOnline​(MyEdge edge)
        Called on Edge isOnline event.
        Parameters:
        edge - the MyEdge.
      • isOffline

        public void isOffline​(MyEdge edge)
        Called on Edge isOffline event.
        Parameters:
        edge - the MyEdge.