-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce new Service Discovery model (#4223)
- Loading branch information
1 parent
7f7a289
commit 5fb8dc0
Showing
195 changed files
with
14,252 additions
and
3,100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<groupId>org.apache.dubbo</groupId> | ||
<artifactId>dubbo-parent</artifactId> | ||
<version>${revision}</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>dubbo-bootstrap</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<name>dubbo-bootstrap</name> | ||
<description>The bootstrap module of Dubbo project</description> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>org.apache.dubbo</groupId> | ||
<artifactId>dubbo-config-api</artifactId> | ||
<version>${project.parent.version}</version> | ||
</dependency> | ||
|
||
<!-- Test dependencies --> | ||
|
||
<!-- Zookeeper dependencies for testing --> | ||
<dependency> | ||
<groupId>org.apache.dubbo</groupId> | ||
<artifactId>dubbo-registry-zookeeper</artifactId> | ||
<version>${project.parent.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.dubbo</groupId> | ||
<artifactId>dubbo-configcenter-zookeeper</artifactId> | ||
<version>${project.parent.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<!-- Nacos dependencies for testing --> | ||
<dependency> | ||
<groupId>org.apache.dubbo</groupId> | ||
<artifactId>dubbo-registry-nacos</artifactId> | ||
<version>${project.parent.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.dubbo</groupId> | ||
<artifactId>dubbo-configcenter-nacos</artifactId> | ||
<version>${project.parent.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.alibaba.nacos</groupId> | ||
<artifactId>nacos-client</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.dubbo</groupId> | ||
<artifactId>dubbo-rpc-dubbo</artifactId> | ||
<version>${project.parent.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.dubbo</groupId> | ||
<artifactId>dubbo-remoting-netty4</artifactId> | ||
<version>${project.parent.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.dubbo</groupId> | ||
<artifactId>dubbo-serialization-hessian2</artifactId> | ||
<version>${project.parent.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.curator</groupId> | ||
<artifactId>curator-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |
36 changes: 36 additions & 0 deletions
36
dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/AbstractSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* 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.dubbo.bootstrap; | ||
|
||
/** | ||
* Abstract {@link Settings} | ||
* | ||
* @since 2.7.3 | ||
*/ | ||
public class AbstractSettings implements Settings { | ||
|
||
private final DubboBootstrap dubboBootstrap; | ||
|
||
public AbstractSettings(DubboBootstrap dubboBootstrap) { | ||
this.dubboBootstrap = dubboBootstrap; | ||
} | ||
|
||
@Override | ||
public DubboBootstrap next() { | ||
return dubboBootstrap; | ||
} | ||
} |
127 changes: 127 additions & 0 deletions
127
dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/ApplicationSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
/* | ||
* 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.dubbo.bootstrap; | ||
|
||
import org.apache.dubbo.config.ApplicationConfig; | ||
import org.apache.dubbo.config.MonitorConfig; | ||
import org.apache.dubbo.config.builders.ApplicationBuilder; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* {@link ApplicationConfig Application} settings | ||
* | ||
* @since 2.7.3 | ||
*/ | ||
public class ApplicationSettings extends AbstractSettings { | ||
|
||
private final ApplicationBuilder builder; | ||
|
||
public ApplicationSettings(ApplicationBuilder builder, DubboBootstrap dubboBootstrap) { | ||
super(dubboBootstrap); | ||
this.builder = builder; | ||
} | ||
|
||
public ApplicationSettings version(String version) { | ||
builder.version(version); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings owner(String owner) { | ||
builder.owner(owner); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings organization(String organization) { | ||
builder.organization(organization); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings architecture(String architecture) { | ||
builder.architecture(architecture); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings environment(String environment) { | ||
builder.environment(environment); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings compiler(String compiler) { | ||
builder.compiler(compiler); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings logger(String logger) { | ||
builder.logger(logger); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings monitor(MonitorConfig monitor) { | ||
builder.monitor(monitor); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings monitor(String monitor) { | ||
builder.monitor(monitor); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings isDefault(Boolean isDefault) { | ||
builder.isDefault(isDefault); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings dumpDirectory(String dumpDirectory) { | ||
builder.dumpDirectory(dumpDirectory); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings qosEnable(Boolean qosEnable) { | ||
builder.qosEnable(qosEnable); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings qosPort(Integer qosPort) { | ||
builder.qosPort(qosPort); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings qosAcceptForeignIp(Boolean qosAcceptForeignIp) { | ||
builder.qosAcceptForeignIp(qosAcceptForeignIp); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings shutwait(String shutwait) { | ||
builder.shutwait(shutwait); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings appendParameter(String key, String value) { | ||
builder.appendParameter(key, value); | ||
return this; | ||
} | ||
|
||
public ApplicationSettings appendParameters(Map<String, String> appendParameters) { | ||
builder.appendParameters(appendParameters); | ||
return this; | ||
} | ||
|
||
ApplicationConfig build() { | ||
return builder.build(); | ||
} | ||
} |
Oops, something went wrong.