Class EventLogLoader

    • Field Detail

      • DEFAULT_BATCH_SIZE

        public static final int DEFAULT_BATCH_SIZE
        Currently 100.
        See Also:
        Constant Field Values
      • batchSize

        protected int batchSize
      • excludes

        protected java.util.List<java.lang.String> excludes
        Array of class types which will get excluded from indexing.
      • query

        protected java.lang.String query
        Query string to be kept in sync with excludes.
        See Also:
        initQueryString()
    • Constructor Detail

      • EventLogLoader

        public EventLogLoader()
    • Method Detail

      • setBatchSize

        public void setBatchSize​(int batchSize)
        Set the number of EventLog instances will be loaded in a single run. If not set, DEFAULT_BATCH_SIZE will be used.
        Parameters:
        batchSize -
      • getBatchSize

        public int getBatchSize()
      • setExcludes

        public void setExcludes​(java.lang.String[] excludes)
        Spring injector
      • setQueryService

        public void setQueryService​(ome.api.IQuery queryService)
        Spring injector
      • hasNext

        public boolean hasNext()
        Tests for available objects. If count is -1, then this batch has ended (set in next()) and false will be returned, EventBacklog will be ready to be switched over to an "adding" state if empty, andcount is also reset so further calls can finish normally; otherwise query() is called to load a new eventLog. Otherwise, just tests that field for null.
        Specified by:
        hasNext in interface java.util.Iterator<ome.model.meta.EventLog>
      • remove

        public final void remove()
        Specified by:
        remove in interface java.util.Iterator<ome.model.meta.EventLog>
      • more

        public abstract long more()
        Should return an estimate of how many more EventLog instances are available for processing. Some implementations may attempt to take extra measures if the number is too large. Use 1 for a constant rather than Long.MAX_VALUE. Use 0 to stop execution.
      • nextEventLog

        public final ome.model.meta.EventLog nextEventLog​(long id)
        Returns the EventLog with the next id after the given argument or null if none exists. This method will only return "true" EventLog instances, with a valid id.
      • addEventLog

        public boolean addEventLog​(java.lang.Class<? extends ome.model.IObject> cls,
                                   long id)
        Adds an EventLog for the given Class and id to the backlog.
      • isStopSet

        public boolean isStopSet()
        Returns true if the stop flag has been set on this instance.
      • setStop

        public void setStop​(boolean stop)
        Called by controlling objects (a worker thread) in order to free up the thread.