public class ModeAnnotationRegistry extends AbstractAnnotationRegistry implements SpaceBeforePrimaryListener, SpaceAfterPrimaryListener, SpaceBeforeBackupListener, SpaceAfterBackupListener
When the application starts beans that has one or more of the anotnation PreBackup
,
PostBackup
, PrePrimary
, PostPrimary
are registered in this bean, and when
events arrive they are routed to the registered beans' methods.
Constructor and Description |
---|
ModeAnnotationRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
onAfterBackup(AfterSpaceModeChangeEvent event)
Invoked after a space changes its mode to
SpaceMode.BACKUP . |
void |
onAfterPrimary(AfterSpaceModeChangeEvent event)
Invoked after a space changes its mode to
SpaceMode.PRIMARY . |
void |
onBeforeBackup(BeforeSpaceModeChangeEvent event)
Invoked before a space changes its mode to
SpaceMode.BACKUP . |
void |
onBeforePrimary(BeforeSpaceModeChangeEvent event)
Invoked before a space changes its mode to
SpaceMode.PRIMARY . |
protected void |
validateMethod(Class<?> annotation,
Method method) |
fireEvent, registerAnnotation
protected void validateMethod(Class<?> annotation, Method method)
validateMethod
in class AbstractAnnotationRegistry
public void onBeforePrimary(BeforeSpaceModeChangeEvent event)
SpaceMode.PRIMARY
.onBeforePrimary
in interface SpaceBeforePrimaryListener
public void onAfterPrimary(AfterSpaceModeChangeEvent event)
SpaceMode.PRIMARY
.onAfterPrimary
in interface SpaceAfterPrimaryListener
public void onBeforeBackup(BeforeSpaceModeChangeEvent event)
SpaceMode.BACKUP
.onBeforeBackup
in interface SpaceBeforeBackupListener
public void onAfterBackup(AfterSpaceModeChangeEvent event)
SpaceMode.BACKUP
.onAfterBackup
in interface SpaceAfterBackupListener
Copyright © GigaSpaces.