Deleted old copyright notice text + Javadocs. DatabaseManager is now a active service
Showing
4 changed files
with
10 additions
and
53 deletions
... | @@ -60,24 +60,8 @@ import com.google.common.collect.ImmutableMap; | ... | @@ -60,24 +60,8 @@ import com.google.common.collect.ImmutableMap; |
60 | import com.google.common.collect.ImmutableSet; | 60 | import com.google.common.collect.ImmutableSet; |
61 | 61 | ||
62 | /** | 62 | /** |
63 | - * Licensed to the Apache Software Foundation (ASF) under one | 63 | + * ONOS Cluster messaging based Copycat protocol. |
64 | - * or more contributor license agreements. See the NOTICE file | ||
65 | - * distributed with this work for additional information | ||
66 | - * regarding copyright ownership. The ASF licenses this file | ||
67 | - * to you under the Apache License, Version 2.0 (the | ||
68 | - * "License"); you may not use this file except in compliance | ||
69 | - * with the License. You may obtain a copy of the License at | ||
70 | - * | ||
71 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
72 | - | ||
73 | - * Unless required by applicable law or agreed to in writing, | ||
74 | - * software distributed under the License is distributed on an | ||
75 | - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
76 | - * KIND, either express or implied. See the License for the | ||
77 | - * specific language governing permissions and limitations under | ||
78 | - * the License. | ||
79 | */ | 64 | */ |
80 | - | ||
81 | @Component(immediate = true) | 65 | @Component(immediate = true) |
82 | @Service | 66 | @Service |
83 | public class ClusterMessagingProtocol implements Protocol<TcpMember> { | 67 | public class ClusterMessagingProtocol implements Protocol<TcpMember> { | ... | ... |
... | @@ -30,24 +30,8 @@ import org.slf4j.Logger; | ... | @@ -30,24 +30,8 @@ import org.slf4j.Logger; |
30 | import com.google.common.util.concurrent.ThreadFactoryBuilder; | 30 | import com.google.common.util.concurrent.ThreadFactoryBuilder; |
31 | 31 | ||
32 | /** | 32 | /** |
33 | - * Licensed to the Apache Software Foundation (ASF) under one | 33 | + * ONOS Cluster messaging based Copycat protocol client. |
34 | - * or more contributor license agreements. See the NOTICE file | ||
35 | - * distributed with this work for additional information | ||
36 | - * regarding copyright ownership. The ASF licenses this file | ||
37 | - * to you under the Apache License, Version 2.0 (the | ||
38 | - * "License"); you may not use this file except in compliance | ||
39 | - * with the License. You may obtain a copy of the License at | ||
40 | - * | ||
41 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
42 | - | ||
43 | - * Unless required by applicable law or agreed to in writing, | ||
44 | - * software distributed under the License is distributed on an | ||
45 | - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
46 | - * KIND, either express or implied. See the License for the | ||
47 | - * specific language governing permissions and limitations under | ||
48 | - * the License. | ||
49 | */ | 34 | */ |
50 | - | ||
51 | public class ClusterMessagingProtocolClient implements ProtocolClient { | 35 | public class ClusterMessagingProtocolClient implements ProtocolClient { |
52 | 36 | ||
53 | private final Logger log = getLogger(getClass()); | 37 | private final Logger log = getLogger(getClass()); | ... | ... |
... | @@ -17,24 +17,8 @@ import org.onlab.onos.store.cluster.messaging.ClusterMessageHandler; | ... | @@ -17,24 +17,8 @@ import org.onlab.onos.store.cluster.messaging.ClusterMessageHandler; |
17 | import org.slf4j.Logger; | 17 | import org.slf4j.Logger; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * Licensed to the Apache Software Foundation (ASF) under one | 20 | + * ONOS Cluster messaging based Copycat protocol server. |
21 | - * or more contributor license agreements. See the NOTICE file | ||
22 | - * distributed with this work for additional information | ||
23 | - * regarding copyright ownership. The ASF licenses this file | ||
24 | - * to you under the Apache License, Version 2.0 (the | ||
25 | - * "License"); you may not use this file except in compliance | ||
26 | - * with the License. You may obtain a copy of the License at | ||
27 | - * | ||
28 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
29 | - | ||
30 | - * Unless required by applicable law or agreed to in writing, | ||
31 | - * software distributed under the License is distributed on an | ||
32 | - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
33 | - * KIND, either express or implied. See the License for the | ||
34 | - * specific language governing permissions and limitations under | ||
35 | - * the License. | ||
36 | */ | 21 | */ |
37 | - | ||
38 | public class ClusterMessagingProtocolServer implements ProtocolServer { | 22 | public class ClusterMessagingProtocolServer implements ProtocolServer { |
39 | 23 | ||
40 | private final Logger log = getLogger(getClass()); | 24 | private final Logger log = getLogger(getClass()); | ... | ... |
... | @@ -15,9 +15,11 @@ import net.kuujo.copycat.log.ChronicleLog; | ... | @@ -15,9 +15,11 @@ import net.kuujo.copycat.log.ChronicleLog; |
15 | import net.kuujo.copycat.log.Log; | 15 | import net.kuujo.copycat.log.Log; |
16 | 16 | ||
17 | import org.apache.felix.scr.annotations.Activate; | 17 | import org.apache.felix.scr.annotations.Activate; |
18 | +import org.apache.felix.scr.annotations.Component; | ||
18 | import org.apache.felix.scr.annotations.Deactivate; | 19 | import org.apache.felix.scr.annotations.Deactivate; |
19 | import org.apache.felix.scr.annotations.Reference; | 20 | import org.apache.felix.scr.annotations.Reference; |
20 | import org.apache.felix.scr.annotations.ReferenceCardinality; | 21 | import org.apache.felix.scr.annotations.ReferenceCardinality; |
22 | +import org.apache.felix.scr.annotations.Service; | ||
21 | import org.onlab.onos.cluster.ClusterService; | 23 | import org.onlab.onos.cluster.ClusterService; |
22 | import org.onlab.onos.cluster.ControllerNode; | 24 | import org.onlab.onos.cluster.ControllerNode; |
23 | import org.onlab.onos.store.service.DatabaseAdminService; | 25 | import org.onlab.onos.store.service.DatabaseAdminService; |
... | @@ -40,8 +42,8 @@ import com.google.common.collect.Lists; | ... | @@ -40,8 +42,8 @@ import com.google.common.collect.Lists; |
40 | * Strongly consistent and durable state management service based on | 42 | * Strongly consistent and durable state management service based on |
41 | * Copycat implementation of Raft consensus protocol. | 43 | * Copycat implementation of Raft consensus protocol. |
42 | */ | 44 | */ |
43 | -//@Component(immediate = true) | 45 | +@Component(immediate = true) |
44 | -//@Service | 46 | +@Service |
45 | public class DatabaseManager implements DatabaseService, DatabaseAdminService { | 47 | public class DatabaseManager implements DatabaseService, DatabaseAdminService { |
46 | 48 | ||
47 | private final Logger log = getLogger(getClass()); | 49 | private final Logger log = getLogger(getClass()); |
... | @@ -59,6 +61,9 @@ public class DatabaseManager implements DatabaseService, DatabaseAdminService { | ... | @@ -59,6 +61,9 @@ public class DatabaseManager implements DatabaseService, DatabaseAdminService { |
59 | 61 | ||
60 | @Activate | 62 | @Activate |
61 | public void activate() { | 63 | public void activate() { |
64 | + | ||
65 | + // TODO: Not every node can be part of the consensus ring. | ||
66 | + | ||
62 | TcpMember localMember = | 67 | TcpMember localMember = |
63 | new TcpMember( | 68 | new TcpMember( |
64 | clusterService.getLocalNode().ip().toString(), | 69 | clusterService.getLocalNode().ip().toString(), | ... | ... |
-
Please register or login to post a comment