Class ModeAnnotationRegistry
java.lang.Object
org.openspaces.core.space.AbstractAnnotationRegistry
org.openspaces.core.space.mode.registry.ModeAnnotationRegistry
- All Implemented Interfaces:
SpaceAfterBackupListener,SpaceAfterPrimaryListener,SpaceBeforeBackupListener,SpaceBeforePrimaryListener
public class ModeAnnotationRegistry
extends AbstractAnnotationRegistry
implements SpaceBeforePrimaryListener, SpaceAfterPrimaryListener, SpaceBeforeBackupListener, SpaceAfterBackupListener
Receives space mode change events and routs them to beans that use annotations to register as
listeners on those events.
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.
- Author:
- shaiw
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked after a space changes its mode toSpaceMode.BACKUP.voidInvoked after a space changes its mode toSpaceMode.PRIMARY.voidInvoked before a space changes its mode toSpaceMode.BACKUP.voidInvoked before a space changes its mode toSpaceMode.PRIMARY.protected voidvalidateMethod(Class<?> annotation, Method method) Methods inherited from class org.openspaces.core.space.AbstractAnnotationRegistry
fireEvent, registerAnnotation
-
Constructor Details
-
ModeAnnotationRegistry
public ModeAnnotationRegistry()
-
-
Method Details
-
validateMethod
- Specified by:
validateMethodin classAbstractAnnotationRegistry
-
onBeforePrimary
Invoked before a space changes its mode toSpaceMode.PRIMARY.- Specified by:
onBeforePrimaryin interfaceSpaceBeforePrimaryListener
-
onAfterPrimary
Invoked after a space changes its mode toSpaceMode.PRIMARY.- Specified by:
onAfterPrimaryin interfaceSpaceAfterPrimaryListener
-
onBeforeBackup
Invoked before a space changes its mode toSpaceMode.BACKUP.- Specified by:
onBeforeBackupin interfaceSpaceBeforeBackupListener
-
onAfterBackup
Invoked after a space changes its mode toSpaceMode.BACKUP.- Specified by:
onAfterBackupin interfaceSpaceAfterBackupListener
-