Class MapsIndexer<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>


  • public class MapsIndexer<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
    extends java.lang.Object
    Maintains a MapsIndex for the maps directory. Changed maps are tracked and the index is updated.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void start()
      Starts indexing.
      void stop()
      Stops indexing.
      void waitForIdle()
      Blocks the calling thread until all pending maps have been indexed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapsIndexer

        public MapsIndexer​(@NotNull
                           @NotNull MapsIndex mapsIndex,
                           @NotNull
                           @NotNull MapManager<G,​A,​R> mapManager,
                           @NotNull
                           @NotNull ProjectSettings projectSettings)
        Creates a new instance.
        Parameters:
        mapsIndex - the maps index to update
        mapManager - the map manager for loading map files
        projectSettings - the project settings instance; defines the indexed maps directory
    • Method Detail

      • start

        public void start()
        Starts indexing. Must not be called more than once.
      • stop

        public void stop()
                  throws java.lang.InterruptedException
        Stops indexing. Must not be called more than once or before start() has been called.
        Throws:
        java.lang.InterruptedException - if the current thread was interrupted
      • waitForIdle

        public void waitForIdle()
                         throws java.lang.InterruptedException
        Blocks the calling thread until all pending maps have been indexed.
        Throws:
        java.lang.InterruptedException - if the current thread was interrupted during wait