Class SemiSpaceAdmin

java.lang.Object
org.semispace.admin.SemiSpaceAdmin
All Implemented Interfaces:
SemiSpaceAdminInterface

public class SemiSpaceAdmin extends Object implements SemiSpaceAdminInterface
  • Constructor Details

  • Method Details

    • getSpaceId

      protected int getSpaceId()
      Used from junit test.
    • getSpace

      protected SemiSpaceInterface getSpace()
      Returns:
      space configured for this admin. Beneficiary for subclasses.
    • getThreadPool

      public ExecutorService getThreadPool()
      Specified by:
      getThreadPool in interface SemiSpaceAdminInterface
      Returns:
      Executor service used for treating thread elements
    • hasBeenInitialized

      public boolean hasBeenInitialized()
      Specified by:
      hasBeenInitialized in interface SemiSpaceAdminInterface
    • isMaster

      public boolean isMaster()
      Specified by:
      isMaster in interface SemiSpaceAdminInterface
    • calculateTime

      public long calculateTime()
      Specified by:
      calculateTime in interface SemiSpaceAdminInterface
    • performInitialization

      public void performInitialization()
      Specified by:
      performInitialization in interface SemiSpaceAdminInterface
    • assumeAdminResponsibility

      protected void assumeAdminResponsibility(boolean sendAdminInfoAboutSystemTime)
    • populateListOfAllSpaces

      protected IdentifyAdminQuery populateListOfAllSpaces(List<IdentifyAdminQuery> admins)
      Protected as it is used every once in a while from periodic object reaper
      Parameters:
      admins - List to fill with the admin processes found
      Returns:
      List of identified SemiSpace admin classes
    • notifyAboutEvent

      public void notifyAboutEvent(DistributedEvent event)
      Description copied from interface: SemiSpaceAdminInterface
      Administrator should get notified about all events. This can be used for attaching persistence engine.
      Specified by:
      notifyAboutEvent in interface SemiSpaceAdminInterface
    • shutdownAndAwaitTermination

      protected void shutdownAndAwaitTermination()
      The cached thread pool has a timeout of a minute, so a shutdown is not immediate. This method will try to speed up the process, but it is not mandatory to use it. The method is protected for the benefit of subclasses.
    • removeShutDownHook

      public void removeShutDownHook()
      Remove shutdown hook which otherwise is run when the space is shut down. Primarily used when exchanging this admin with another.