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 2013/11/08 09:53:08 UTC
git commit: updating the partitions events
Updated Branches:
refs/heads/master ef8cd5d9a -> ce9735434
updating the partitions events
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/ce973543
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/ce973543
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/ce973543
Branch: refs/heads/master
Commit: ce9735434f7690433f41a396eeec50dd6fd478cc
Parents: ef8cd5d
Author: rekathiru <rt...@gmail.com>
Authored: Fri Nov 8 14:22:46 2013 +0530
Committer: rekathiru <rt...@gmail.com>
Committed: Fri Nov 8 14:22:46 2013 +0530
----------------------------------------------------------------------
.../event/topology/PartitionCreatedEvent.java | 68 +++++++++++++++++
.../event/topology/PartitionRemovedEvent.java | 35 +++++++++
.../event/topology/PartitionUpdatedEvent.java | 78 ++++++++++++++++++++
3 files changed, 181 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ce973543/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionCreatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionCreatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionCreatedEvent.java
new file mode 100644
index 0000000..6eba8d1
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionCreatedEvent.java
@@ -0,0 +1,68 @@
+/*
+ * 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.topology;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class PartitionCreatedEvent {
+ private String id;
+ private String scope;
+ private Map<String, String> properties = new HashMap<String, String>();
+
+ PartitionCreatedEvent(String id, String scope) {
+ this.id = id;
+ this.scope = scope;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getScope() {
+ return scope;
+ }
+
+ public void setScope(String scope) {
+ this.scope = scope;
+ }
+
+ public Map<String, String> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, String> properties) {
+ this.properties = properties;
+ }
+
+ public void setProperty(String key, String value) {
+
+ if (key != null && value != null) {
+ getProperties().put(key, value);
+ }
+ }
+
+ public String getProperty(String key) {
+ return getProperties().get(key);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ce973543/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionRemovedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionRemovedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionRemovedEvent.java
new file mode 100644
index 0000000..6a5fa5c
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionRemovedEvent.java
@@ -0,0 +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.topology;
+
+public class PartitionRemovedEvent {
+ private String partitionId;
+
+ PartitionRemovedEvent(String partitionId) {
+ this.partitionId = partitionId;
+ }
+
+ public String getPartitionId() {
+ return partitionId;
+ }
+
+ public void setPartitionId(String partitionId) {
+ this.partitionId = partitionId;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ce973543/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionUpdatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionUpdatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionUpdatedEvent.java
new file mode 100644
index 0000000..e0b96c6
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/PartitionUpdatedEvent.java
@@ -0,0 +1,78 @@
+/*
+ * 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.topology;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class PartitionUpdatedEvent {
+ private String id;
+ private String scope;
+ private Map<String, String> properties = new HashMap<String, String>();
+ private String oldPartitionId;
+
+ PartitionUpdatedEvent(String id, String scope, String oldId) {
+ this.id = id;
+ this.scope = scope;
+ this.oldPartitionId = oldId;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getScope() {
+ return scope;
+ }
+
+ public void setScope(String scope) {
+ this.scope = scope;
+ }
+
+ public Map<String, String> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, String> properties) {
+ this.properties = properties;
+ }
+
+ public void setProperty(String key, String value) {
+
+ if (key != null && value != null) {
+ getProperties().put(key, value);
+ }
+ }
+
+ public String getProperty(String key) {
+ return getProperties().get(key);
+ }
+
+ public String getOldPartitionId() {
+ return oldPartitionId;
+ }
+
+ public void setOldPartitionId(String oldPartitionId) {
+ this.oldPartitionId = oldPartitionId;
+ }
+}