Skip to content

Commit

Permalink
Merge pull request #748 from gunlee01/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
gunlee01 authored Sep 14, 2020
2 parents fab908a + 0ec8f02 commit b2a9ffc
Show file tree
Hide file tree
Showing 156 changed files with 7,937 additions and 1,161 deletions.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.8.1</version>
<version>2.10.0</version>
<packaging>pom</packaging>

<name>SCOUTER APM</name>
Expand Down Expand Up @@ -175,6 +175,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
Expand Down
2 changes: 1 addition & 1 deletion scouter.agent.batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.8.1</version>
<version>2.10.0</version>
</parent>

<artifactId>scouter-agent-batch</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion scouter.agent.host/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.8.1</version>
<version>2.10.0</version>
</parent>

<artifactId>scouter-agent-host</artifactId>
Expand Down
81 changes: 69 additions & 12 deletions scouter.agent.java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.8.1</version>
<version>2.10.0</version>
</parent>

<artifactId>scouter-agent-java</artifactId>
Expand Down Expand Up @@ -79,6 +79,17 @@
<include name="scouter/xtra/redis/*.class" />
</fileset>
</jar>
<jar destfile="${project.build.directory}/${scouter.reactive.jar}">
<fileset dir="${project.build.outputDirectory}">
<include name="scouter/xtra/reactive/*.class" />
<include name="reactor/**/*.class" />
</fileset>
</jar>
<jar destfile="${project.build.directory}/${scouter.java8.jar}">
<fileset dir="${project.build.outputDirectory}">
<include name="scouter/xtra/java8/*.class" />
</fileset>
</jar>
</target>
</configuration>
<goals>
Expand All @@ -101,6 +112,8 @@
<include name="${scouter.tools.jar}" />
<include name="${scouter.kafka.jar}" />
<include name="${scouter.redis.jar}" />
<include name="${scouter.reactive.jar}" />
<include name="${scouter.java8.jar}" />
</fileset>
<zipfileset src="${final.jar.name}" />

Expand All @@ -121,6 +134,8 @@
<delete file="${project.build.directory}/${scouter.tools.jar}" />
<delete file="${project.build.directory}/${scouter.kafka.jar}" />
<delete file="${project.build.directory}/${scouter.redis.jar}" />
<delete file="${project.build.directory}/${scouter.reactive.jar}" />
<delete file="${project.build.directory}/${scouter.java8.jar}" />

<!-- for constant name file -->
<jar destfile="${project.build.directory}/${scouter.agent.file.name}">
Expand All @@ -136,7 +151,7 @@

<!-- for min file -->
<jar destfile="${project.build.directory}/${scouter.agent.min.file.name}">
<zipfileset src="${final.jar.name}" excludes="scouter/repack/net/bytebuddy/**/*" />
<zipfileset src="${final.jar.name}"/>
<manifest>
<attribute name="Premain-Class" value="scouter.agent.JavaAgent" />
<attribute name="Agent-Class" value="scouter.agent.JavaAgent" />
Expand Down Expand Up @@ -206,6 +221,12 @@
<compilerVersion>1.6</compilerVersion>
<source>1.6</source>
<target>1.6</target>
<excludes>
<exclude>scouter/xtra/reactive/*.java</exclude>
<exclude>scouter/xtra/java8/*.java</exclude>
<exclude>reactor/**/*.java</exclude>
<exclude>com/**/*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -340,6 +361,8 @@
<scouter.tools.jar>scouter.tools.jar</scouter.tools.jar>
<scouter.kafka.jar>scouter.kafka.jar</scouter.kafka.jar>
<scouter.redis.jar>scouter.redis.jar</scouter.redis.jar>
<scouter.reactive.jar>scouter.reactive.jar</scouter.reactive.jar>
<scouter.java8.jar>scouter.java8.jar</scouter.java8.jar>

<provided.tools.jar>${project.basedir}/lib/provided/tools.jar</provided.tools.jar>
<java.net.http.jar>${project.basedir}/lib/provided/java.net.http.jar</java.net.http.jar>
Expand All @@ -361,19 +384,14 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.0</version>
<version>8.0.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>7.0</version>
<version>8.0.1</version>
</dependency>
<!-- local lib -->
<dependency>
<groupId>com.github.scouter-project</groupId>
<artifactId>byte-buddy-nodep-scouter-repack</artifactId>
<version>1.7.1.RC1</version>
</dependency>
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
Expand Down Expand Up @@ -423,13 +441,37 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.3.18.RELEASE</version>
<version>5.2.8.RELEASE</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webflux</artifactId>
<version>5.2.8.RELEASE</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>3.3.8.RELEASE</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-reactor</artifactId>
<version>1.3.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>1.3.72</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.3.19.RELEASE</version>
<version>5.2.8.RELEASE</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -438,6 +480,19 @@
<version>0.10.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
<version>6.8.10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-core</artifactId>
<version>4.0.5</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
Expand Down Expand Up @@ -482,7 +537,9 @@
</manifestEntries>
</archive>
<excludes>
<exclude>**/scouter/xtra/**</exclude>
<exclude>scouter/xtra/**</exclude>
<exclude>reactor/**</exclude>
<exclude>com/**</exclude>
</excludes>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2008-present MongoDB, Inc.
*
* Licensed 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.
*/

//for mongo driver 3.8
package com.mongodb.async;

/**
* An interface to describe the completion of an asynchronous operation.
*
* @param <T> the result type
* @since 3.0
*/
public interface SingleResultCallback<T> {
/**
* Called when the operation completes.
* @param result the result, which may be null. Always null if e is not null.
* @param t the throwable, or null if the operation completed normally
*/
void onResult(T result, Throwable t);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
/*
* Copyright (c) 2008-2014 MongoDB, Inc.
*
* Licensed 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.
*/

//for mongo db driver 3.6
package com.mongodb.connection;

import com.mongodb.async.SingleResultCallback;
import com.mongodb.internal.connection.CommandMessage;
import com.mongodb.internal.connection.ResponseBuffers;
import com.mongodb.internal.session.SessionContext;
import org.bson.ByteBuf;
import org.bson.codecs.Decoder;

import java.util.List;

public interface InternalConnection extends BufferProvider {

/**
* Gets the description of this connection.
*
* @return the connection description
*/
ConnectionDescription getDescription();

/**
* Opens the connection so its ready for use
*/
void open();

/**
* Opens the connection so its ready for use
*
* @param callback the callback to be called once the connection has been opened
*/
void openAsync(SingleResultCallback<Void> callback);

/**
* Closes the connection.
*/
void close();

/**
* Returns if the connection has been opened
*
* @return true if connection has been opened
*/
boolean opened();

/**
* Returns the closed state of the connection
*
* @return true if connection is closed
*/
boolean isClosed();

/**
* Send a command message to the server.
*
* @param message the command message to send
* @param sessionContext the session context
*/
<T> T sendAndReceive(CommandMessage message, Decoder<T> decoder, SessionContext sessionContext);

/**
* Send a command message to the server.
*
* @param message the command message to send
* @param sessionContext the session context
* @param callback the callback
*/
<T> void sendAndReceiveAsync(CommandMessage message, Decoder<T> decoder, SessionContext sessionContext,
SingleResultCallback<T> callback);

/**
* Send a message to the server. The connection may not make any attempt to validate the integrity of the message.
*
* @param byteBuffers the list of byte buffers to send.
* @param lastRequestId the request id of the last message in byteBuffers
*/
void sendMessage(List<ByteBuf> byteBuffers, int lastRequestId);

/**
* Receive a response to a sent message from the server.
*
* @param responseTo the request id that this message is a response to
* @return the response
*/
ResponseBuffers receiveMessage(int responseTo);

/**
* Asynchronously send a message to the server. The connection may not make any attempt to validate the integrity of the message.
*
* @param byteBuffers the list of byte buffers to send
* @param lastRequestId the request id of the last message in byteBuffers
* @param callback the callback to invoke on completion
*/
void sendMessageAsync(List<ByteBuf> byteBuffers, int lastRequestId, SingleResultCallback<Void> callback);

/**
* Asynchronously receive a response to a sent message from the server.
*
* @param responseTo the request id that this message is a response to
* @param callback the callback to invoke on completion
*/
void receiveMessageAsync(int responseTo, SingleResultCallback<ResponseBuffers> callback);

}
Loading

0 comments on commit b2a9ffc

Please sign in to comment.