stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lahiru Sandaruwan <lahi...@wso2.com>
Subject Regarding "onParentStatusEvent" in abstract cluster monitor/cluster monitor
Date Sun, 04 Jan 2015 08:27:16 GMT
Hi guys,

In AbstractClusterMonitor, $subject seems not completed. But it is also
overridden in ClusterMonitor class. Therefore this might not get executed.
Do we need this anymore?


    @Override
    public void onParentStatusEvent(MonitorStatusEvent statusEvent) {
        if (statusEvent.getStatus() == GroupStatus.Terminating ||
                statusEvent.getStatus() == ApplicationStatus.Terminating) {
            ClusterStatusEventPublisher.sendClusterTerminatingEvent(appId,
this.getServiceId(),
                    clusterId, statusEvent.getInstanceId());
        } else if (statusEvent.getStatus() == ClusterStatus.Created ||
                statusEvent.getStatus() == GroupStatus.Created) {
            Application application =
ApplicationHolder.getApplications().getApplication(this.appId);
            Group group = application.getGroupRecursively(statusEvent.getId());
            //TODO*****starting a new instance of this monitor
            //createGroupInstance(group, statusEvent.getInstanceId());
        }
        // send the ClusterTerminating event
//        if (statusEvent.getStatus() == GroupStatus.Terminating ||
statusEvent.getStatus() ==
//                ApplicationStatus.Terminating) {
//
//        }
    }

Thanks.
-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Mime
View raw message