Class SemiSpaceAdmin
java.lang.Object
org.semispace.admin.SemiSpaceAdmin
- All Implemented Interfaces:
SemiSpaceAdminInterface
-
Constructor Summary
ConstructorsConstructorDescriptionSemiSpaceAdmin(SemiSpaceInterface terraSpace, SemiSpaceSerializer serializer) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassumeAdminResponsibility(boolean sendAdminInfoAboutSystemTime) longprotected SemiSpaceInterfacegetSpace()protected intUsed from junit test.booleanbooleanisMaster()voidnotifyAboutEvent(DistributedEvent event) Administrator should get notified about all events.voidprotected IdentifyAdminQueryProtected as it is used every once in a while from periodic object reapervoidRemove shutdown hook which otherwise is run when the space is shut down.protected voidThe cached thread pool has a timeout of a minute, so a shutdown is not immediate.
-
Constructor Details
-
SemiSpaceAdmin
-
-
Method Details
-
getSpaceId
protected int getSpaceId()Used from junit test. -
getSpace
- Returns:
- space configured for this admin. Beneficiary for subclasses.
-
getThreadPool
- Specified by:
getThreadPoolin interfaceSemiSpaceAdminInterface- Returns:
- Executor service used for treating thread elements
-
hasBeenInitialized
public boolean hasBeenInitialized()- Specified by:
hasBeenInitializedin interfaceSemiSpaceAdminInterface
-
isMaster
public boolean isMaster()- Specified by:
isMasterin interfaceSemiSpaceAdminInterface
-
calculateTime
public long calculateTime()- Specified by:
calculateTimein interfaceSemiSpaceAdminInterface
-
performInitialization
public void performInitialization()- Specified by:
performInitializationin interfaceSemiSpaceAdminInterface
-
assumeAdminResponsibility
protected void assumeAdminResponsibility(boolean sendAdminInfoAboutSystemTime) -
populateListOfAllSpaces
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
Description copied from interface:SemiSpaceAdminInterfaceAdministrator should get notified about all events. This can be used for attaching persistence engine.- Specified by:
notifyAboutEventin interfaceSemiSpaceAdminInterface
-
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.
-