Class RenderThemeFuture

  • All Implemented Interfaces:
    java.lang.Runnable, java.util.concurrent.Future<RenderTheme>, java.util.concurrent.RunnableFuture<RenderTheme>

    public class RenderThemeFuture
    extends java.util.concurrent.FutureTask<RenderTheme>
    A RenderThemeFuture implements a asynchronous parsing of an XmlRenderTheme in order to move the delay caused by parsing the XML file off the user interface thread in mapsforge application. The RenderThemeFuture is reference counted to make it shareable between threads. Each thread that uses the RenderThemeFuture to retrieve a rendertheme should first call incrementRefCount to ensure that the RenderTheme does not get destroyed while the thread is waiting for execution.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void decrementRefCount()  
      void incrementRefCount()  
      • Methods inherited from class java.util.concurrent.FutureTask

        cancel, done, get, get, isCancelled, isDone, run, runAndReset, set, setException, toString
      • Methods inherited from class java.lang.Object

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

      • RenderThemeFuture

        public RenderThemeFuture​(org.mapsforge.core.graphics.GraphicFactory graphicFactory,
                                 XmlRenderTheme xmlRenderTheme,
                                 DisplayModel displayModel)
    • Method Detail

      • decrementRefCount

        public void decrementRefCount()
      • incrementRefCount

        public void incrementRefCount()