You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2014/01/03 07:12:29 UTC
git commit: fixing STRATOS-331
Updated Branches:
refs/heads/master 30c261334 -> 174ce3171
fixing STRATOS-331
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/174ce317
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/174ce317
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/174ce317
Branch: refs/heads/master
Commit: 174ce317187934039c9df8144a70457c39d33696
Parents: 30c2613
Author: rekathiru <rt...@gmail.com>
Authored: Fri Jan 3 11:42:38 2014 +0530
Committer: rekathiru <rt...@gmail.com>
Committed: Fri Jan 3 11:42:38 2014 +0530
----------------------------------------------------------------------
.../messaging/domain/topology/MemberStatus.java | 2 +-
.../instance/notifier/InstanceCleanupEvent.java | 33 ++++++++++-
.../instance/status/InstanceActivatedEvent.java | 2 +-
.../status/InstanceReadyToShutdownEvent.java | 58 +++++++++++++++++++-
.../instance/status/InstanceStartedEvent.java | 2 +-
5 files changed, 92 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/174ce317/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/MemberStatus.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/MemberStatus.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/MemberStatus.java
index 2b9ce0c..fd74e4c 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/MemberStatus.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/MemberStatus.java
@@ -26,5 +26,5 @@ import javax.xml.bind.annotation.XmlRootElement;
*/
@XmlRootElement
public enum MemberStatus {
- Created, Starting, Activated, Suspended, Terminated
+ Created, Starting, Activated, Suspended, ReadyToShutDown, ShuttingDown, Terminated
}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/174ce317/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/notifier/InstanceCleanupEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/notifier/InstanceCleanupEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/notifier/InstanceCleanupEvent.java
index 7bcde01..ce97347 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/notifier/InstanceCleanupEvent.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/notifier/InstanceCleanupEvent.java
@@ -1,4 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.stratos.messaging.event.instance.notifier;
-public class InstanceCleanupEvent {
+import java.io.Serializable;
+
+public class InstanceCleanupEvent extends InstanceNotifierEvent implements Serializable {
+ private String clusterId;
+ private String memberId;
+
+ public InstanceCleanupEvent(String clusterId, String memberId) {
+ this.clusterId = clusterId;
+ this.memberId = memberId;
+ }
+
+ public String getClusterId() {
+ return clusterId;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/174ce317/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceActivatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceActivatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceActivatedEvent.java
index dd16ff9..db6022d 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceActivatedEvent.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceActivatedEvent.java
@@ -27,7 +27,7 @@ import java.io.Serializable;
* This event is fired by cartridge agent when it has started the server and
* applications are ready to serve the incoming requests.
*/
-public class InstanceActivatedEvent extends TopologyEvent implements Serializable {
+public class InstanceActivatedEvent extends InstanceStatusEvent implements Serializable {
private static final long serialVersionUID = 2625412714611885089L;
private final String serviceName;
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/174ce317/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceReadyToShutdownEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceReadyToShutdownEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceReadyToShutdownEvent.java
index 7a51f87..4c9513c 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceReadyToShutdownEvent.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceReadyToShutdownEvent.java
@@ -1,4 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.stratos.messaging.event.instance.status;
-public class InstanceReadyToShutdownEvent {
+import java.io.Serializable;
+
+public class InstanceReadyToShutdownEvent extends InstanceStatusEvent implements Serializable {
+ private final String serviceName;
+ private final String clusterId;
+ private final String networkPartitionId;
+ private final String partitionId;
+ private final String memberId;
+
+ public InstanceReadyToShutdownEvent(String serviceName, String clusterId,
+ String networkPartitionId, String partitionId, String memberId) {
+ this.serviceName = serviceName;
+ this.clusterId = clusterId;
+ this.networkPartitionId = networkPartitionId;
+ this.partitionId = partitionId;
+ this.memberId = memberId;
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public String getClusterId() {
+ return clusterId;
+ }
+
+ public String getPartitionId() {
+ return partitionId;
+ }
+
+ public String getMemberId() {
+ return memberId;
+ }
+
+ public String getNetworkPartitionId() {
+ return networkPartitionId;
+ }
+
+
}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/174ce317/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceStartedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceStartedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceStartedEvent.java
index 5722744..c904283 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceStartedEvent.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceStartedEvent.java
@@ -26,7 +26,7 @@ import java.io.Serializable;
/**
* This event is fired by cartridge agent when the its started.
*/
-public class InstanceStartedEvent extends TopologyEvent implements Serializable {
+public class InstanceStartedEvent extends InstanceStatusEvent implements Serializable {
private static final long serialVersionUID = 7447068435627208619L;
private final String serviceName;