You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by vi...@apache.org on 2016/12/28 10:02:34 UTC
[27/50] [abbrv] incubator-rocketmq git commit: ROCKETMQ-18 Reformat
all codes.
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetKVConfigResponseHeader.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetKVConfigResponseHeader.java b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetKVConfigResponseHeader.java
index 88e20d9..71ff698 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetKVConfigResponseHeader.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetKVConfigResponseHeader.java
@@ -6,13 +6,13 @@
* (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
+ * 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.
+ * 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.rocketmq.common.protocol.header.namesrv;
@@ -21,7 +21,6 @@ import org.apache.rocketmq.remoting.CommandCustomHeader;
import org.apache.rocketmq.remoting.annotation.CFNullable;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
-
/**
*
*/
@@ -29,17 +28,14 @@ public class GetKVConfigResponseHeader implements CommandCustomHeader {
@CFNullable
private String value;
-
@Override
public void checkFields() throws RemotingCommandException {
}
-
public String getValue() {
return value;
}
-
public void setValue(String value) {
this.value = value;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetKVListByNamespaceRequestHeader.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetKVListByNamespaceRequestHeader.java b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetKVListByNamespaceRequestHeader.java
index eea086e..32a3748 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetKVListByNamespaceRequestHeader.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetKVListByNamespaceRequestHeader.java
@@ -6,13 +6,13 @@
* (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
+ * 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.
+ * 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.rocketmq.common.protocol.header.namesrv;
@@ -21,7 +21,6 @@ import org.apache.rocketmq.remoting.CommandCustomHeader;
import org.apache.rocketmq.remoting.annotation.CFNotNull;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
-
/**
*
*/
@@ -29,17 +28,14 @@ public class GetKVListByNamespaceRequestHeader implements CommandCustomHeader {
@CFNotNull
private String namespace;
-
@Override
public void checkFields() throws RemotingCommandException {
}
-
public String getNamespace() {
return namespace;
}
-
public void setNamespace(String namespace) {
this.namespace = namespace;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetRouteInfoRequestHeader.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetRouteInfoRequestHeader.java b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetRouteInfoRequestHeader.java
index 4c01d53..62abaec 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetRouteInfoRequestHeader.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetRouteInfoRequestHeader.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: GetRouteInfoRequestHeader.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -24,22 +26,18 @@ import org.apache.rocketmq.remoting.CommandCustomHeader;
import org.apache.rocketmq.remoting.annotation.CFNotNull;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
-
public class GetRouteInfoRequestHeader implements CommandCustomHeader {
@CFNotNull
private String topic;
-
@Override
public void checkFields() throws RemotingCommandException {
}
-
public String getTopic() {
return topic;
}
-
public void setTopic(String topic) {
this.topic = topic;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetRouteInfoResponseHeader.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetRouteInfoResponseHeader.java b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetRouteInfoResponseHeader.java
index 9b192d3..a122cea 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetRouteInfoResponseHeader.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/GetRouteInfoResponseHeader.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: GetRouteInfoResponseHeader.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -23,7 +25,6 @@ package org.apache.rocketmq.common.protocol.header.namesrv;
import org.apache.rocketmq.remoting.CommandCustomHeader;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
-
public class GetRouteInfoResponseHeader implements CommandCustomHeader {
@Override
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/PutKVConfigRequestHeader.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/PutKVConfigRequestHeader.java b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/PutKVConfigRequestHeader.java
index 01e9a5e..bdc35bb 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/PutKVConfigRequestHeader.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/PutKVConfigRequestHeader.java
@@ -6,13 +6,13 @@
* (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
+ * 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.
+ * 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.rocketmq.common.protocol.header.namesrv;
@@ -21,7 +21,6 @@ import org.apache.rocketmq.remoting.CommandCustomHeader;
import org.apache.rocketmq.remoting.annotation.CFNotNull;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
-
public class PutKVConfigRequestHeader implements CommandCustomHeader {
@CFNotNull
private String namespace;
@@ -30,37 +29,30 @@ public class PutKVConfigRequestHeader implements CommandCustomHeader {
@CFNotNull
private String value;
-
@Override
public void checkFields() throws RemotingCommandException {
}
-
public String getNamespace() {
return namespace;
}
-
public void setNamespace(String namespace) {
this.namespace = namespace;
}
-
public String getKey() {
return key;
}
-
public void setKey(String key) {
this.key = key;
}
-
public String getValue() {
return value;
}
-
public void setValue(String value) {
this.value = value;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterBrokerRequestHeader.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterBrokerRequestHeader.java b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterBrokerRequestHeader.java
index 2ac0102..dbfecb1 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterBrokerRequestHeader.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterBrokerRequestHeader.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: RegisterBrokerRequestHeader.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -24,7 +26,6 @@ import org.apache.rocketmq.remoting.CommandCustomHeader;
import org.apache.rocketmq.remoting.annotation.CFNotNull;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
-
public class RegisterBrokerRequestHeader implements CommandCustomHeader {
@CFNotNull
private String brokerName;
@@ -37,57 +38,46 @@ public class RegisterBrokerRequestHeader implements CommandCustomHeader {
@CFNotNull
private Long brokerId;
-
@Override
public void checkFields() throws RemotingCommandException {
}
-
public String getBrokerName() {
return brokerName;
}
-
public void setBrokerName(String brokerName) {
this.brokerName = brokerName;
}
-
public String getBrokerAddr() {
return brokerAddr;
}
-
public void setBrokerAddr(String brokerAddr) {
this.brokerAddr = brokerAddr;
}
-
public String getClusterName() {
return clusterName;
}
-
public void setClusterName(String clusterName) {
this.clusterName = clusterName;
}
-
public String getHaServerAddr() {
return haServerAddr;
}
-
public void setHaServerAddr(String haServerAddr) {
this.haServerAddr = haServerAddr;
}
-
public Long getBrokerId() {
return brokerId;
}
-
public void setBrokerId(Long brokerId) {
this.brokerId = brokerId;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterBrokerResponseHeader.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterBrokerResponseHeader.java b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterBrokerResponseHeader.java
index 68b26ec..2e44046 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterBrokerResponseHeader.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterBrokerResponseHeader.java
@@ -6,13 +6,13 @@
* (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
+ * 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.
+ * 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.rocketmq.common.protocol.header.namesrv;
@@ -21,7 +21,6 @@ import org.apache.rocketmq.remoting.CommandCustomHeader;
import org.apache.rocketmq.remoting.annotation.CFNullable;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
-
/**
*
*/
@@ -31,27 +30,22 @@ public class RegisterBrokerResponseHeader implements CommandCustomHeader {
@CFNullable
private String masterAddr;
-
@Override
public void checkFields() throws RemotingCommandException {
}
-
public String getHaServerAddr() {
return haServerAddr;
}
-
public void setHaServerAddr(String haServerAddr) {
this.haServerAddr = haServerAddr;
}
-
public String getMasterAddr() {
return masterAddr;
}
-
public void setMasterAddr(String masterAddr) {
this.masterAddr = masterAddr;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterOrderTopicRequestHeader.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterOrderTopicRequestHeader.java b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterOrderTopicRequestHeader.java
index 9381fa9..0e04c79 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterOrderTopicRequestHeader.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/RegisterOrderTopicRequestHeader.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: RegisterOrderTopicRequestHeader.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -24,35 +26,29 @@ import org.apache.rocketmq.remoting.CommandCustomHeader;
import org.apache.rocketmq.remoting.annotation.CFNotNull;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
-
public class RegisterOrderTopicRequestHeader implements CommandCustomHeader {
@CFNotNull
private String topic;
@CFNotNull
private String orderTopicString;
-
@Override
public void checkFields() throws RemotingCommandException {
// TODO Auto-generated method stub
}
-
public String getTopic() {
return topic;
}
-
public void setTopic(String topic) {
this.topic = topic;
}
-
public String getOrderTopicString() {
return orderTopicString;
}
-
public void setOrderTopicString(String orderTopicString) {
this.orderTopicString = orderTopicString;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/UnRegisterBrokerRequestHeader.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/UnRegisterBrokerRequestHeader.java b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/UnRegisterBrokerRequestHeader.java
index e5bdd93..9f6fd27 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/UnRegisterBrokerRequestHeader.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/UnRegisterBrokerRequestHeader.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: UnRegisterBrokerRequestHeader.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -24,7 +26,6 @@ import org.apache.rocketmq.remoting.CommandCustomHeader;
import org.apache.rocketmq.remoting.annotation.CFNotNull;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
-
public class UnRegisterBrokerRequestHeader implements CommandCustomHeader {
@CFNotNull
private String brokerName;
@@ -35,47 +36,38 @@ public class UnRegisterBrokerRequestHeader implements CommandCustomHeader {
@CFNotNull
private Long brokerId;
-
@Override
public void checkFields() throws RemotingCommandException {
}
-
public String getBrokerName() {
return brokerName;
}
-
public void setBrokerName(String brokerName) {
this.brokerName = brokerName;
}
-
public String getBrokerAddr() {
return brokerAddr;
}
-
public void setBrokerAddr(String brokerAddr) {
this.brokerAddr = brokerAddr;
}
-
public String getClusterName() {
return clusterName;
}
-
public void setClusterName(String clusterName) {
this.clusterName = clusterName;
}
-
public Long getBrokerId() {
return brokerId;
}
-
public void setBrokerId(Long brokerId) {
this.brokerId = brokerId;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/WipeWritePermOfBrokerRequestHeader.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/WipeWritePermOfBrokerRequestHeader.java b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/WipeWritePermOfBrokerRequestHeader.java
index 3f943d7..b94146b 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/WipeWritePermOfBrokerRequestHeader.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/WipeWritePermOfBrokerRequestHeader.java
@@ -6,13 +6,13 @@
* (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
+ * 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.
+ * 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.rocketmq.common.protocol.header.namesrv;
@@ -20,7 +20,6 @@ import org.apache.rocketmq.remoting.CommandCustomHeader;
import org.apache.rocketmq.remoting.annotation.CFNotNull;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
-
/**
*
*/
@@ -28,18 +27,15 @@ public class WipeWritePermOfBrokerRequestHeader implements CommandCustomHeader {
@CFNotNull
private String brokerName;
-
@Override
public void checkFields() throws RemotingCommandException {
}
-
public String getBrokerName() {
return brokerName;
}
-
public void setBrokerName(String brokerName) {
this.brokerName = brokerName;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/WipeWritePermOfBrokerResponseHeader.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/WipeWritePermOfBrokerResponseHeader.java b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/WipeWritePermOfBrokerResponseHeader.java
index 83d28b6..fd22393 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/WipeWritePermOfBrokerResponseHeader.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/header/namesrv/WipeWritePermOfBrokerResponseHeader.java
@@ -6,13 +6,13 @@
* (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
+ * 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.
+ * 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.rocketmq.common.protocol.header.namesrv;
@@ -20,7 +20,6 @@ import org.apache.rocketmq.remoting.CommandCustomHeader;
import org.apache.rocketmq.remoting.annotation.CFNotNull;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
-
/**
*
*/
@@ -28,17 +27,14 @@ public class WipeWritePermOfBrokerResponseHeader implements CommandCustomHeader
@CFNotNull
private Integer wipeTopicCount;
-
@Override
public void checkFields() throws RemotingCommandException {
}
-
public Integer getWipeTopicCount() {
return wipeTopicCount;
}
-
public void setWipeTopicCount(Integer wipeTopicCount) {
this.wipeTopicCount = wipeTopicCount;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ConsumeType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ConsumeType.java b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ConsumeType.java
index 923053b..49fe045 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ConsumeType.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ConsumeType.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: ConsumeType.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -32,7 +34,6 @@ public enum ConsumeType {
this.typeCN = typeCN;
}
-
public String getTypeCN() {
return typeCN;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ConsumerData.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ConsumerData.java b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ConsumerData.java
index 88d9972..c2a0107 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ConsumerData.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ConsumerData.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: ConsumerData.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -20,11 +22,9 @@
*/
package org.apache.rocketmq.common.protocol.heartbeat;
-import org.apache.rocketmq.common.consumer.ConsumeFromWhere;
-
import java.util.HashSet;
import java.util.Set;
-
+import org.apache.rocketmq.common.consumer.ConsumeFromWhere;
public class ConsumerData {
private String groupName;
@@ -34,71 +34,58 @@ public class ConsumerData {
private Set<SubscriptionData> subscriptionDataSet = new HashSet<SubscriptionData>();
private boolean unitMode;
-
public String getGroupName() {
return groupName;
}
-
public void setGroupName(String groupName) {
this.groupName = groupName;
}
-
public ConsumeType getConsumeType() {
return consumeType;
}
-
public void setConsumeType(ConsumeType consumeType) {
this.consumeType = consumeType;
}
-
public MessageModel getMessageModel() {
return messageModel;
}
-
public void setMessageModel(MessageModel messageModel) {
this.messageModel = messageModel;
}
-
public ConsumeFromWhere getConsumeFromWhere() {
return consumeFromWhere;
}
-
public void setConsumeFromWhere(ConsumeFromWhere consumeFromWhere) {
this.consumeFromWhere = consumeFromWhere;
}
-
public Set<SubscriptionData> getSubscriptionDataSet() {
return subscriptionDataSet;
}
-
public void setSubscriptionDataSet(Set<SubscriptionData> subscriptionDataSet) {
this.subscriptionDataSet = subscriptionDataSet;
}
-
public boolean isUnitMode() {
return unitMode;
}
-
public void setUnitMode(boolean isUnitMode) {
this.unitMode = isUnitMode;
}
-
@Override
public String toString() {
return "ConsumerData [groupName=" + groupName + ", consumeType=" + consumeType + ", messageModel="
- + messageModel + ", consumeFromWhere=" + consumeFromWhere + ", unitMode=" + unitMode
- + ", subscriptionDataSet=" + subscriptionDataSet + "]";
+ + messageModel + ", consumeFromWhere=" + consumeFromWhere + ", unitMode=" + unitMode
+ + ", subscriptionDataSet=" + subscriptionDataSet + "]";
}
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/HeartbeatData.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/HeartbeatData.java b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/HeartbeatData.java
index 20a1927..5257174 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/HeartbeatData.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/HeartbeatData.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: HeartbeatData.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -20,51 +22,42 @@
*/
package org.apache.rocketmq.common.protocol.heartbeat;
-import org.apache.rocketmq.remoting.protocol.RemotingSerializable;
-
import java.util.HashSet;
import java.util.Set;
-
+import org.apache.rocketmq.remoting.protocol.RemotingSerializable;
public class HeartbeatData extends RemotingSerializable {
private String clientID;
private Set<ProducerData> producerDataSet = new HashSet<ProducerData>();
private Set<ConsumerData> consumerDataSet = new HashSet<ConsumerData>();
-
public String getClientID() {
return clientID;
}
-
public void setClientID(String clientID) {
this.clientID = clientID;
}
-
public Set<ProducerData> getProducerDataSet() {
return producerDataSet;
}
-
public void setProducerDataSet(Set<ProducerData> producerDataSet) {
this.producerDataSet = producerDataSet;
}
-
public Set<ConsumerData> getConsumerDataSet() {
return consumerDataSet;
}
-
public void setConsumerDataSet(Set<ConsumerData> consumerDataSet) {
this.consumerDataSet = consumerDataSet;
}
-
@Override
public String toString() {
return "HeartbeatData [clientID=" + clientID + ", producerDataSet=" + producerDataSet
- + ", consumerDataSet=" + consumerDataSet + "]";
+ + ", consumerDataSet=" + consumerDataSet + "]";
}
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/MessageModel.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/MessageModel.java b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/MessageModel.java
index 858df3f..d710502 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/MessageModel.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/MessageModel.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: MessageModel.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -40,7 +42,6 @@ public enum MessageModel {
this.modeCN = modeCN;
}
-
public String getModeCN() {
return modeCN;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ProducerData.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ProducerData.java b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ProducerData.java
index 7d3d054..b7d4c95 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ProducerData.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/ProducerData.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: ProducerData.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -23,17 +25,14 @@ package org.apache.rocketmq.common.protocol.heartbeat;
public class ProducerData {
private String groupName;
-
public String getGroupName() {
return groupName;
}
-
public void setGroupName(String groupName) {
this.groupName = groupName;
}
-
@Override
public String toString() {
return "ProducerData [groupName=" + groupName + "]";
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/SubscriptionData.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/SubscriptionData.java b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/SubscriptionData.java
index c1c9f84..8c4292a 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/SubscriptionData.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/SubscriptionData.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: SubscriptionData.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -21,11 +23,9 @@
package org.apache.rocketmq.common.protocol.heartbeat;
import com.alibaba.fastjson.annotation.JSONField;
-
import java.util.HashSet;
import java.util.Set;
-
public class SubscriptionData implements Comparable<SubscriptionData> {
public final static String SUB_ALL = "*";
private boolean classFilterMode = false;
@@ -38,12 +38,10 @@ public class SubscriptionData implements Comparable<SubscriptionData> {
@JSONField(serialize = false)
private String filterClassSource;
-
public SubscriptionData() {
}
-
public SubscriptionData(String topic, String subString) {
super();
this.topic = topic;
@@ -62,62 +60,50 @@ public class SubscriptionData implements Comparable<SubscriptionData> {
return topic;
}
-
public void setTopic(String topic) {
this.topic = topic;
}
-
public String getSubString() {
return subString;
}
-
public void setSubString(String subString) {
this.subString = subString;
}
-
public Set<String> getTagsSet() {
return tagsSet;
}
-
public void setTagsSet(Set<String> tagsSet) {
this.tagsSet = tagsSet;
}
-
public long getSubVersion() {
return subVersion;
}
-
public void setSubVersion(long subVersion) {
this.subVersion = subVersion;
}
-
public Set<Integer> getCodeSet() {
return codeSet;
}
-
public void setCodeSet(Set<Integer> codeSet) {
this.codeSet = codeSet;
}
-
public boolean isClassFilterMode() {
return classFilterMode;
}
-
public void setClassFilterMode(boolean classFilterMode) {
this.classFilterMode = classFilterMode;
}
-
@Override
public int hashCode() {
final int prime = 31;
@@ -130,7 +116,6 @@ public class SubscriptionData implements Comparable<SubscriptionData> {
return result;
}
-
@Override
public boolean equals(Object obj) {
if (this == obj)
@@ -139,7 +124,7 @@ public class SubscriptionData implements Comparable<SubscriptionData> {
return false;
if (getClass() != obj.getClass())
return false;
- SubscriptionData other = (SubscriptionData) obj;
+ SubscriptionData other = (SubscriptionData)obj;
if (classFilterMode != other.classFilterMode)
return false;
if (codeSet == null) {
@@ -167,15 +152,13 @@ public class SubscriptionData implements Comparable<SubscriptionData> {
return true;
}
-
@Override
public String toString() {
return "SubscriptionData [classFilterMode=" + classFilterMode + ", topic=" + topic + ", subString="
- + subString + ", tagsSet=" + tagsSet + ", codeSet=" + codeSet + ", subVersion=" + subVersion
- + "]";
+ + subString + ", tagsSet=" + tagsSet + ", codeSet=" + codeSet + ", subVersion=" + subVersion
+ + "]";
}
-
@Override
public int compareTo(SubscriptionData other) {
String thisValue = this.topic + "@" + this.subString;
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/route/BrokerData.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/route/BrokerData.java b/common/src/main/java/org/apache/rocketmq/common/protocol/route/BrokerData.java
index 08e82b1..f79bdb5 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/route/BrokerData.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/route/BrokerData.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: BrokerData.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -20,11 +22,9 @@
*/
package org.apache.rocketmq.common.protocol.route;
-import org.apache.rocketmq.common.MixAll;
-
import java.util.HashMap;
import java.util.Map;
-
+import org.apache.rocketmq.common.MixAll;
/**
*
@@ -78,7 +78,7 @@ public class BrokerData implements Comparable<BrokerData> {
return false;
if (getClass() != obj.getClass())
return false;
- BrokerData other = (BrokerData) obj;
+ BrokerData other = (BrokerData)obj;
if (brokerAddrs == null) {
if (other.brokerAddrs != null)
return false;
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/route/QueueData.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/route/QueueData.java b/common/src/main/java/org/apache/rocketmq/common/protocol/route/QueueData.java
index 3c72565..3fe3e2c 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/route/QueueData.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/route/QueueData.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: QueueData.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -79,7 +81,7 @@ public class QueueData implements Comparable<QueueData> {
return false;
if (getClass() != obj.getClass())
return false;
- QueueData other = (QueueData) obj;
+ QueueData other = (QueueData)obj;
if (brokerName == null) {
if (other.brokerName != null)
return false;
@@ -99,8 +101,8 @@ public class QueueData implements Comparable<QueueData> {
@Override
public String toString() {
return "QueueData [brokerName=" + brokerName + ", readQueueNums=" + readQueueNums
- + ", writeQueueNums=" + writeQueueNums + ", perm=" + perm + ", topicSynFlag=" + topicSynFlag
- + "]";
+ + ", writeQueueNums=" + writeQueueNums + ", perm=" + perm + ", topicSynFlag=" + topicSynFlag
+ + "]";
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/route/TopicRouteData.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/route/TopicRouteData.java b/common/src/main/java/org/apache/rocketmq/common/protocol/route/TopicRouteData.java
index 0061c25..64d9726 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/route/TopicRouteData.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/route/TopicRouteData.java
@@ -6,13 +6,15 @@
* (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
+ * 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.
+ * 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.
+ *
+ * $Id: TopicRouteData.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
*/
/**
@@ -20,12 +22,10 @@
*/
package org.apache.rocketmq.common.protocol.route;
-import org.apache.rocketmq.remoting.protocol.RemotingSerializable;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
-
+import org.apache.rocketmq.remoting.protocol.RemotingSerializable;
public class TopicRouteData extends RemotingSerializable {
private String orderTopicConf;
@@ -33,7 +33,6 @@ public class TopicRouteData extends RemotingSerializable {
private List<BrokerData> brokerDatas;
private HashMap<String/* brokerAddr */, List<String>/* Filter Server */> filterServerTable;
-
public TopicRouteData cloneTopicRouteData() {
TopicRouteData topicRouteData = new TopicRouteData();
topicRouteData.setQueueDatas(new ArrayList<QueueData>());
@@ -56,22 +55,18 @@ public class TopicRouteData extends RemotingSerializable {
return topicRouteData;
}
-
public List<QueueData> getQueueDatas() {
return queueDatas;
}
-
public void setQueueDatas(List<QueueData> queueDatas) {
this.queueDatas = queueDatas;
}
-
public List<BrokerData> getBrokerDatas() {
return brokerDatas;
}
-
public void setBrokerDatas(List<BrokerData> brokerDatas) {
this.brokerDatas = brokerDatas;
}
@@ -111,7 +106,7 @@ public class TopicRouteData extends RemotingSerializable {
return false;
if (getClass() != obj.getClass())
return false;
- TopicRouteData other = (TopicRouteData) obj;
+ TopicRouteData other = (TopicRouteData)obj;
if (brokerDatas == null) {
if (other.brokerDatas != null)
return false;
@@ -138,6 +133,6 @@ public class TopicRouteData extends RemotingSerializable {
@Override
public String toString() {
return "TopicRouteData [orderTopicConf=" + orderTopicConf + ", queueDatas=" + queueDatas
- + ", brokerDatas=" + brokerDatas + ", filterServerTable=" + filterServerTable + "]";
+ + ", brokerDatas=" + brokerDatas + ", filterServerTable=" + filterServerTable + "]";
}
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/protocol/topic/OffsetMovedEvent.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/protocol/topic/OffsetMovedEvent.java b/common/src/main/java/org/apache/rocketmq/common/protocol/topic/OffsetMovedEvent.java
index df5ec71..920685c 100644
--- a/common/src/main/java/org/apache/rocketmq/common/protocol/topic/OffsetMovedEvent.java
+++ b/common/src/main/java/org/apache/rocketmq/common/protocol/topic/OffsetMovedEvent.java
@@ -6,13 +6,13 @@
* (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
+ * 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.
+ * 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.rocketmq.common.protocol.topic;
@@ -20,57 +20,47 @@ package org.apache.rocketmq.common.protocol.topic;
import org.apache.rocketmq.common.message.MessageQueue;
import org.apache.rocketmq.remoting.protocol.RemotingSerializable;
-
public class OffsetMovedEvent extends RemotingSerializable {
private String consumerGroup;
private MessageQueue messageQueue;
private long offsetRequest;
private long offsetNew;
-
public String getConsumerGroup() {
return consumerGroup;
}
-
public void setConsumerGroup(String consumerGroup) {
this.consumerGroup = consumerGroup;
}
-
public MessageQueue getMessageQueue() {
return messageQueue;
}
-
public void setMessageQueue(MessageQueue messageQueue) {
this.messageQueue = messageQueue;
}
-
public long getOffsetRequest() {
return offsetRequest;
}
-
public void setOffsetRequest(long offsetRequest) {
this.offsetRequest = offsetRequest;
}
-
public long getOffsetNew() {
return offsetNew;
}
-
public void setOffsetNew(long offsetNew) {
this.offsetNew = offsetNew;
}
-
@Override
public String toString() {
return "OffsetMovedEvent [consumerGroup=" + consumerGroup + ", messageQueue=" + messageQueue
- + ", offsetRequest=" + offsetRequest + ", offsetNew=" + offsetNew + "]";
+ + ", offsetRequest=" + offsetRequest + ", offsetNew=" + offsetNew + "]";
}
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/queue/ConcurrentTreeMap.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/queue/ConcurrentTreeMap.java b/common/src/main/java/org/apache/rocketmq/common/queue/ConcurrentTreeMap.java
index 897988f..021ba83 100644
--- a/common/src/main/java/org/apache/rocketmq/common/queue/ConcurrentTreeMap.java
+++ b/common/src/main/java/org/apache/rocketmq/common/queue/ConcurrentTreeMap.java
@@ -6,26 +6,24 @@
* (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
+ * 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.
+ * 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.rocketmq.common.queue;
-import org.apache.rocketmq.common.constant.LoggerName;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import java.util.Comparator;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.locks.ReentrantLock;
-
+import org.apache.rocketmq.common.constant.LoggerName;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* thread safe
@@ -37,14 +35,12 @@ public class ConcurrentTreeMap<K, V> {
private TreeMap<K, V> tree;
private RoundQueue<K> roundQueue;
-
public ConcurrentTreeMap(int capacity, Comparator<? super K> comparator) {
tree = new TreeMap<K, V>(comparator);
roundQueue = new RoundQueue<K>(capacity);
lock = new ReentrantLock(true);
}
-
public Map.Entry<K, V> pollFirstEntry() {
lock.lock();
try {
@@ -54,7 +50,6 @@ public class ConcurrentTreeMap<K, V> {
}
}
-
public V putIfAbsentAndRetExsit(K key, V value) {
lock.lock();
try {
@@ -66,9 +61,7 @@ public class ConcurrentTreeMap<K, V> {
}
log.warn("putIfAbsentAndRetExsit success. {}", key);
return exsit;
- }
-
- else {
+ } else {
V exsit = tree.get(key);
return exsit;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/queue/RoundQueue.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/queue/RoundQueue.java b/common/src/main/java/org/apache/rocketmq/common/queue/RoundQueue.java
index 11168e6..e9f2177 100644
--- a/common/src/main/java/org/apache/rocketmq/common/queue/RoundQueue.java
+++ b/common/src/main/java/org/apache/rocketmq/common/queue/RoundQueue.java
@@ -6,13 +6,13 @@
* (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
+ * 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.
+ * 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.rocketmq.common.queue;
@@ -20,7 +20,6 @@ package org.apache.rocketmq.common.queue;
import java.util.LinkedList;
import java.util.Queue;
-
/**
* not thread safe
*
@@ -30,13 +29,11 @@ public class RoundQueue<E> {
private Queue<E> queue;
private int capacity;
-
public RoundQueue(int capacity) {
this.capacity = capacity;
queue = new LinkedList<E>();
}
-
public boolean put(E e) {
boolean ok = false;
if (!queue.contains(e)) {
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/running/RunningStats.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/running/RunningStats.java b/common/src/main/java/org/apache/rocketmq/common/running/RunningStats.java
index 106d111..6cfd4bf 100644
--- a/common/src/main/java/org/apache/rocketmq/common/running/RunningStats.java
+++ b/common/src/main/java/org/apache/rocketmq/common/running/RunningStats.java
@@ -6,13 +6,13 @@
* (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
+ * 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.
+ * 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.rocketmq.common.running;
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItem.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItem.java b/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItem.java
index 58eedb2..b9fcfb8 100644
--- a/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItem.java
+++ b/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItem.java
@@ -17,13 +17,11 @@
package org.apache.rocketmq.common.stats;
-import org.apache.rocketmq.common.UtilAll;
-import org.slf4j.Logger;
-
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
-
+import org.apache.rocketmq.common.UtilAll;
+import org.slf4j.Logger;
public class MomentStatsItem {
@@ -34,16 +32,14 @@ public class MomentStatsItem {
private final ScheduledExecutorService scheduledExecutorService;
private final Logger log;
-
public MomentStatsItem(String statsName, String statsKey,
- ScheduledExecutorService scheduledExecutorService, Logger log) {
+ ScheduledExecutorService scheduledExecutorService, Logger log) {
this.statsName = statsName;
this.statsKey = statsKey;
this.scheduledExecutorService = scheduledExecutorService;
this.log = log;
}
-
public void init() {
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
@@ -58,24 +54,21 @@ public class MomentStatsItem {
}, Math.abs(UtilAll.computNextMinutesTimeMillis() - System.currentTimeMillis()), 1000 * 60 * 5, TimeUnit.MILLISECONDS);
}
-
public void printAtMinutes() {
log.info(String.format("[%s] [%s] Stats Every 5 Minutes, Value: %d",
- this.statsName,
- this.statsKey,
- this.value.get()));
+ this.statsName,
+ this.statsKey,
+ this.value.get()));
}
public AtomicLong getValue() {
return value;
}
-
public String getStatsKey() {
return statsKey;
}
-
public String getStatsName() {
return statsName;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItemSet.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItemSet.java b/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItemSet.java
index aba61c7..44cc603 100644
--- a/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItemSet.java
+++ b/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItemSet.java
@@ -17,24 +17,21 @@
package org.apache.rocketmq.common.stats;
-import org.apache.rocketmq.common.UtilAll;
-import org.slf4j.Logger;
-
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
-
+import org.apache.rocketmq.common.UtilAll;
+import org.slf4j.Logger;
public class MomentStatsItemSet {
private final ConcurrentHashMap<String/* key */, MomentStatsItem> statsItemTable =
- new ConcurrentHashMap<String, MomentStatsItem>(128);
+ new ConcurrentHashMap<String, MomentStatsItem>(128);
private final String statsName;
private final ScheduledExecutorService scheduledExecutorService;
private final Logger log;
-
public MomentStatsItemSet(String statsName, ScheduledExecutorService scheduledExecutorService, Logger log) {
this.statsName = statsName;
this.scheduledExecutorService = scheduledExecutorService;
@@ -80,7 +77,7 @@ public class MomentStatsItemSet {
MomentStatsItem statsItem = this.statsItemTable.get(statsKey);
if (null == statsItem) {
statsItem =
- new MomentStatsItem(this.statsName, statsKey, this.scheduledExecutorService, this.log);
+ new MomentStatsItem(this.statsName, statsKey, this.scheduledExecutorService, this.log);
MomentStatsItem prev = this.statsItemTable.put(statsKey, statsItem);
if (null == prev) {
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java b/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java
index 42bb561..b1703b1 100644
--- a/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java
+++ b/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java
@@ -17,14 +17,12 @@
package org.apache.rocketmq.common.stats;
-import org.apache.rocketmq.common.UtilAll;
-import org.slf4j.Logger;
-
import java.util.LinkedList;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
-
+import org.apache.rocketmq.common.UtilAll;
+import org.slf4j.Logger;
public class StatsItem {
@@ -34,10 +32,8 @@ public class StatsItem {
private final LinkedList<CallSnapshot> csListMinute = new LinkedList<CallSnapshot>();
-
private final LinkedList<CallSnapshot> csListHour = new LinkedList<CallSnapshot>();
-
private final LinkedList<CallSnapshot> csListDay = new LinkedList<CallSnapshot>();
private final String statsName;
@@ -45,19 +41,14 @@ public class StatsItem {
private final ScheduledExecutorService scheduledExecutorService;
private final Logger log;
-
public StatsItem(String statsName, String statsKey, ScheduledExecutorService scheduledExecutorService,
- Logger log) {
+ Logger log) {
this.statsName = statsName;
this.statsKey = statsKey;
this.scheduledExecutorService = scheduledExecutorService;
this.log = log;
}
- public StatsSnapshot getStatsDataInMinute() {
- return computeStatsData(this.csListMinute);
- }
-
private static StatsSnapshot computeStatsData(final LinkedList<CallSnapshot> csList) {
StatsSnapshot statsSnapshot = new StatsSnapshot();
synchronized (csList) {
@@ -84,6 +75,10 @@ public class StatsItem {
return statsSnapshot;
}
+ public StatsSnapshot getStatsDataInMinute() {
+ return computeStatsData(this.csListMinute);
+ }
+
public StatsSnapshot getStatsDataInHour() {
return computeStatsData(this.csListHour);
}
@@ -104,7 +99,6 @@ public class StatsItem {
}
}, 0, 10, TimeUnit.SECONDS);
-
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
@@ -115,7 +109,6 @@ public class StatsItem {
}
}, 0, 10, TimeUnit.MINUTES);
-
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
@@ -126,7 +119,6 @@ public class StatsItem {
}
}, 0, 1, TimeUnit.HOURS);
-
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
@@ -137,7 +129,6 @@ public class StatsItem {
}
}, Math.abs(UtilAll.computNextMinutesTimeMillis() - System.currentTimeMillis()), 1000 * 60, TimeUnit.MILLISECONDS);
-
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
@@ -148,7 +139,6 @@ public class StatsItem {
}
}, Math.abs(UtilAll.computNextHourTimeMillis() - System.currentTimeMillis()), 1000 * 60 * 60, TimeUnit.MILLISECONDS);
-
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
@@ -163,7 +153,7 @@ public class StatsItem {
public void samplingInSeconds() {
synchronized (this.csListMinute) {
this.csListMinute.add(new CallSnapshot(System.currentTimeMillis(), this.times.get(), this.value
- .get()));
+ .get()));
if (this.csListMinute.size() > 7) {
this.csListMinute.removeFirst();
}
@@ -173,7 +163,7 @@ public class StatsItem {
public void samplingInMinutes() {
synchronized (this.csListHour) {
this.csListHour.add(new CallSnapshot(System.currentTimeMillis(), this.times.get(), this.value
- .get()));
+ .get()));
if (this.csListHour.size() > 7) {
this.csListHour.removeFirst();
}
@@ -183,7 +173,7 @@ public class StatsItem {
public void samplingInHour() {
synchronized (this.csListDay) {
this.csListDay.add(new CallSnapshot(System.currentTimeMillis(), this.times.get(), this.value
- .get()));
+ .get()));
if (this.csListDay.size() > 25) {
this.csListDay.removeFirst();
}
@@ -193,61 +183,56 @@ public class StatsItem {
public void printAtMinutes() {
StatsSnapshot ss = computeStatsData(this.csListMinute);
log.info(String.format("[%s] [%s] Stats In One Minute, SUM: %d TPS: %.2f AVGPT: %.2f",
- this.statsName,
- this.statsKey,
- ss.getSum(),
- ss.getTps(),
- ss.getAvgpt()));
+ this.statsName,
+ this.statsKey,
+ ss.getSum(),
+ ss.getTps(),
+ ss.getAvgpt()));
}
public void printAtHour() {
StatsSnapshot ss = computeStatsData(this.csListHour);
log.info(String.format("[%s] [%s] Stats In One Hour, SUM: %d TPS: %.2f AVGPT: %.2f",
- this.statsName,
- this.statsKey,
- ss.getSum(),
- ss.getTps(),
- ss.getAvgpt()));
+ this.statsName,
+ this.statsKey,
+ ss.getSum(),
+ ss.getTps(),
+ ss.getAvgpt()));
}
public void printAtDay() {
StatsSnapshot ss = computeStatsData(this.csListDay);
log.info(String.format("[%s] [%s] Stats In One Day, SUM: %d TPS: %.2f AVGPT: %.2f",
- this.statsName,
- this.statsKey,
- ss.getSum(),
- ss.getTps(),
- ss.getAvgpt()));
+ this.statsName,
+ this.statsKey,
+ ss.getSum(),
+ ss.getTps(),
+ ss.getAvgpt()));
}
public AtomicLong getValue() {
return value;
}
-
public String getStatsKey() {
return statsKey;
}
-
public String getStatsName() {
return statsName;
}
-
public AtomicLong getTimes() {
return times;
}
}
-
class CallSnapshot {
private final long timestamp;
private final long times;
private final long value;
-
public CallSnapshot(long timestamp, long times, long value) {
super();
this.timestamp = timestamp;
@@ -255,17 +240,14 @@ class CallSnapshot {
this.value = value;
}
-
public long getTimestamp() {
return timestamp;
}
-
public long getTimes() {
return times;
}
-
public long getValue() {
return value;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java b/common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java
index 919745d..726bf6a 100644
--- a/common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java
+++ b/common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java
@@ -17,25 +17,22 @@
package org.apache.rocketmq.common.stats;
-import org.apache.rocketmq.common.UtilAll;
-import org.slf4j.Logger;
-
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
-
+import org.apache.rocketmq.common.UtilAll;
+import org.slf4j.Logger;
public class StatsItemSet {
private final ConcurrentHashMap<String/* key */, StatsItem> statsItemTable =
- new ConcurrentHashMap<String, StatsItem>(128);
+ new ConcurrentHashMap<String, StatsItem>(128);
private final String statsName;
private final ScheduledExecutorService scheduledExecutorService;
private final Logger log;
-
public StatsItemSet(String statsName, ScheduledExecutorService scheduledExecutorService, Logger log) {
this.statsName = statsName;
this.scheduledExecutorService = scheduledExecutorService;
@@ -55,7 +52,6 @@ public class StatsItemSet {
}
}, 0, 10, TimeUnit.SECONDS);
-
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
@@ -66,7 +62,6 @@ public class StatsItemSet {
}
}, 0, 10, TimeUnit.MINUTES);
-
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
@@ -77,7 +72,6 @@ public class StatsItemSet {
}
}, 0, 1, TimeUnit.HOURS);
-
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
@@ -88,7 +82,6 @@ public class StatsItemSet {
}
}, Math.abs(UtilAll.computNextMinutesTimeMillis() - System.currentTimeMillis()), 1000 * 60, TimeUnit.MILLISECONDS);
-
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
@@ -99,7 +92,6 @@ public class StatsItemSet {
}
}, Math.abs(UtilAll.computNextHourTimeMillis() - System.currentTimeMillis()), 1000 * 60 * 60, TimeUnit.MILLISECONDS);
-
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/stats/StatsSnapshot.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/stats/StatsSnapshot.java b/common/src/main/java/org/apache/rocketmq/common/stats/StatsSnapshot.java
index 652d214..4df39d1 100644
--- a/common/src/main/java/org/apache/rocketmq/common/stats/StatsSnapshot.java
+++ b/common/src/main/java/org/apache/rocketmq/common/stats/StatsSnapshot.java
@@ -6,13 +6,13 @@
* (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
+ * 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.
+ * 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.rocketmq.common.stats;
@@ -22,32 +22,26 @@ public class StatsSnapshot {
private double tps;
private double avgpt;
-
public long getSum() {
return sum;
}
-
public void setSum(long sum) {
this.sum = sum;
}
-
public double getTps() {
return tps;
}
-
public void setTps(double tps) {
this.tps = tps;
}
-
public double getAvgpt() {
return avgpt;
}
-
public void setAvgpt(double avgpt) {
this.avgpt = avgpt;
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/subscription/SubscriptionGroupConfig.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/subscription/SubscriptionGroupConfig.java b/common/src/main/java/org/apache/rocketmq/common/subscription/SubscriptionGroupConfig.java
index 8fc14cd..9bf97fb 100644
--- a/common/src/main/java/org/apache/rocketmq/common/subscription/SubscriptionGroupConfig.java
+++ b/common/src/main/java/org/apache/rocketmq/common/subscription/SubscriptionGroupConfig.java
@@ -19,7 +19,6 @@ package org.apache.rocketmq.common.subscription;
import org.apache.rocketmq.common.MixAll;
-
public class SubscriptionGroupConfig {
private String groupName;
@@ -39,82 +38,66 @@ public class SubscriptionGroupConfig {
private boolean notifyConsumerIdsChangedEnable = true;
-
public String getGroupName() {
return groupName;
}
-
public void setGroupName(String groupName) {
this.groupName = groupName;
}
-
public boolean isConsumeEnable() {
return consumeEnable;
}
-
public void setConsumeEnable(boolean consumeEnable) {
this.consumeEnable = consumeEnable;
}
-
public boolean isConsumeFromMinEnable() {
return consumeFromMinEnable;
}
-
public void setConsumeFromMinEnable(boolean consumeFromMinEnable) {
this.consumeFromMinEnable = consumeFromMinEnable;
}
-
public boolean isConsumeBroadcastEnable() {
return consumeBroadcastEnable;
}
-
public void setConsumeBroadcastEnable(boolean consumeBroadcastEnable) {
this.consumeBroadcastEnable = consumeBroadcastEnable;
}
-
public int getRetryQueueNums() {
return retryQueueNums;
}
-
public void setRetryQueueNums(int retryQueueNums) {
this.retryQueueNums = retryQueueNums;
}
-
public int getRetryMaxTimes() {
return retryMaxTimes;
}
-
public void setRetryMaxTimes(int retryMaxTimes) {
this.retryMaxTimes = retryMaxTimes;
}
-
public long getBrokerId() {
return brokerId;
}
-
public void setBrokerId(long brokerId) {
this.brokerId = brokerId;
}
-
public long getWhichBrokerWhenConsumeSlowly() {
return whichBrokerWhenConsumeSlowly;
}
-
public void setWhichBrokerWhenConsumeSlowly(long whichBrokerWhenConsumeSlowly) {
this.whichBrokerWhenConsumeSlowly = whichBrokerWhenConsumeSlowly;
}
@@ -131,7 +114,7 @@ public class SubscriptionGroupConfig {
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + (int) (brokerId ^ (brokerId >>> 32));
+ result = prime * result + (int)(brokerId ^ (brokerId >>> 32));
result = prime * result + (consumeBroadcastEnable ? 1231 : 1237);
result = prime * result + (consumeEnable ? 1231 : 1237);
result = prime * result + (consumeFromMinEnable ? 1231 : 1237);
@@ -140,11 +123,10 @@ public class SubscriptionGroupConfig {
result = prime * result + retryMaxTimes;
result = prime * result + retryQueueNums;
result =
- prime * result + (int) (whichBrokerWhenConsumeSlowly ^ (whichBrokerWhenConsumeSlowly >>> 32));
+ prime * result + (int)(whichBrokerWhenConsumeSlowly ^ (whichBrokerWhenConsumeSlowly >>> 32));
return result;
}
-
@Override
public boolean equals(Object obj) {
if (this == obj)
@@ -153,7 +135,7 @@ public class SubscriptionGroupConfig {
return false;
if (getClass() != obj.getClass())
return false;
- SubscriptionGroupConfig other = (SubscriptionGroupConfig) obj;
+ SubscriptionGroupConfig other = (SubscriptionGroupConfig)obj;
if (brokerId != other.brokerId)
return false;
if (consumeBroadcastEnable != other.consumeBroadcastEnable)
@@ -178,14 +160,13 @@ public class SubscriptionGroupConfig {
return true;
}
-
@Override
public String toString() {
return "SubscriptionGroupConfig [groupName=" + groupName + ", consumeEnable=" + consumeEnable
- + ", consumeFromMinEnable=" + consumeFromMinEnable + ", consumeBroadcastEnable="
- + consumeBroadcastEnable + ", retryQueueNums=" + retryQueueNums + ", retryMaxTimes="
- + retryMaxTimes + ", brokerId=" + brokerId + ", whichBrokerWhenConsumeSlowly="
- + whichBrokerWhenConsumeSlowly + ", notifyConsumerIdsChangedEnable="
- + notifyConsumerIdsChangedEnable + "]";
+ + ", consumeFromMinEnable=" + consumeFromMinEnable + ", consumeBroadcastEnable="
+ + consumeBroadcastEnable + ", retryQueueNums=" + retryQueueNums + ", retryMaxTimes="
+ + retryMaxTimes + ", brokerId=" + brokerId + ", whichBrokerWhenConsumeSlowly="
+ + whichBrokerWhenConsumeSlowly + ", notifyConsumerIdsChangedEnable="
+ + notifyConsumerIdsChangedEnable + "]";
}
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/sysflag/MessageSysFlag.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/sysflag/MessageSysFlag.java b/common/src/main/java/org/apache/rocketmq/common/sysflag/MessageSysFlag.java
index 4ccfef7..c213543 100644
--- a/common/src/main/java/org/apache/rocketmq/common/sysflag/MessageSysFlag.java
+++ b/common/src/main/java/org/apache/rocketmq/common/sysflag/MessageSysFlag.java
@@ -24,17 +24,14 @@ public class MessageSysFlag {
public final static int TRANSACTION_COMMIT_TYPE = 0x2 << 2;
public final static int TRANSACTION_ROLLBACK_TYPE = 0x3 << 2;
-
public static int getTransactionValue(final int flag) {
return flag & TRANSACTION_ROLLBACK_TYPE;
}
-
public static int resetTransactionValue(final int flag, final int type) {
return (flag & (~TRANSACTION_ROLLBACK_TYPE)) | type;
}
-
public static int clearCompressedFlag(final int flag) {
return flag & (~COMPRESSED_FLAG);
}
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/388ba7a5/common/src/main/java/org/apache/rocketmq/common/sysflag/PullSysFlag.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/rocketmq/common/sysflag/PullSysFlag.java b/common/src/main/java/org/apache/rocketmq/common/sysflag/PullSysFlag.java
index 193459c..b659c52 100644
--- a/common/src/main/java/org/apache/rocketmq/common/sysflag/PullSysFlag.java
+++ b/common/src/main/java/org/apache/rocketmq/common/sysflag/PullSysFlag.java
@@ -6,13 +6,13 @@
* (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
+ * 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.
+ * 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.rocketmq.common.sysflag;
@@ -22,9 +22,8 @@ public class PullSysFlag {
private final static int FLAG_SUBSCRIPTION = 0x1 << 2;
private final static int FLAG_CLASS_FILTER = 0x1 << 3;
-
public static int buildSysFlag(final boolean commitOffset, final boolean suspend,
- final boolean subscription, final boolean classFilter) {
+ final boolean subscription, final boolean classFilter) {
int flag = 0;
if (commitOffset) {
@@ -46,27 +45,22 @@ public class PullSysFlag {
return flag;
}
-
public static int clearCommitOffsetFlag(final int sysFlag) {
return sysFlag & (~FLAG_COMMIT_OFFSET);
}
-
public static boolean hasCommitOffsetFlag(final int sysFlag) {
return (sysFlag & FLAG_COMMIT_OFFSET) == FLAG_COMMIT_OFFSET;
}
-
public static boolean hasSuspendFlag(final int sysFlag) {
return (sysFlag & FLAG_SUSPEND) == FLAG_SUSPEND;
}
-
public static boolean hasSubscriptionFlag(final int sysFlag) {
return (sysFlag & FLAG_SUBSCRIPTION) == FLAG_SUBSCRIPTION;
}
-
public static boolean hasClassFilterFlag(final int sysFlag) {
return (sysFlag & FLAG_CLASS_FILTER) == FLAG_CLASS_FILTER;
}