Rename package
This commit is contained in:
parent
0973673fce
commit
c0ddce316b
1
.github/CONTRIBUTING.md
vendored
1
.github/CONTRIBUTING.md
vendored
@ -1 +0,0 @@
|
||||
Please review the [guidelines for contributing](https://netty.io/wiki/developer-guide.html) for this repository.
|
13
.github/ISSUE_TEMPLATE.md
vendored
13
.github/ISSUE_TEMPLATE.md
vendored
@ -1,13 +0,0 @@
|
||||
### Expected behavior
|
||||
|
||||
### Actual behavior
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
### Minimal yet complete reproducer code (or URL to code)
|
||||
|
||||
### Netty version
|
||||
|
||||
### JVM version (e.g. `java -version`)
|
||||
|
||||
### OS version (e.g. `uname -a`)
|
14
.github/PULL_REQUEST_TEMPLATE.md
vendored
14
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,14 +0,0 @@
|
||||
Motivation:
|
||||
|
||||
Explain here the context, and why you're making that change.
|
||||
What is the problem you're trying to solve.
|
||||
|
||||
Modification:
|
||||
|
||||
Describe the modifications you've done.
|
||||
|
||||
Result:
|
||||
|
||||
Fixes #<GitHub issue number>.
|
||||
|
||||
If there is no issue then describe the changes introduced by this PR.
|
33
.github/scripts/build_affected_only.sh
vendored
33
.github/scripts/build_affected_only.sh
vendored
@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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.
|
||||
# ----------------------------------------------------------------------------
|
||||
set -e
|
||||
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "Expected branch and maven arguments"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MODULES=$(git diff --name-only "$1" | cut -d '/' -f 1 | sort -u | sed -n -e 'H;${x;s/\n/,/g;s/^,//;p;}')
|
||||
MAVEN_ARGUMENTS=${*:2}
|
||||
if [ -z "$MODULES" ]; then
|
||||
echo "No changes detected, skipping build"
|
||||
exit 0
|
||||
fi
|
||||
echo "Changes detected, start the build"
|
||||
echo "./mvnw -pl $MODULES -amd $MAVEN_ARGUMENTS"
|
||||
./mvnw -pl "$MODULES" -amd "${@:2}"
|
||||
|
30
.github/scripts/check_build_result.sh
vendored
30
.github/scripts/check_build_result.sh
vendored
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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.
|
||||
# ----------------------------------------------------------------------------
|
||||
set -e
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Expected build log as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep -q 'BUILD FAILURE' $1 ; then
|
||||
echo "Build failure detected, please inspect build log"
|
||||
exit 1
|
||||
else
|
||||
echo "Build successful"
|
||||
exit 0
|
||||
fi
|
31
.github/scripts/check_leak.sh
vendored
31
.github/scripts/check_leak.sh
vendored
@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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.
|
||||
# ----------------------------------------------------------------------------
|
||||
set -e
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Expected build log as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep -q 'LEAK:' $1 ; then
|
||||
echo "Leak detected, please inspect build log"
|
||||
exit 1
|
||||
else
|
||||
echo "No Leak detected"
|
||||
exit 0
|
||||
fi
|
||||
|
35
.github/scripts/merge_local_staging.sh
vendored
35
.github/scripts/merge_local_staging.sh
vendored
@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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.
|
||||
# ----------------------------------------------------------------------------
|
||||
set -e
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "Expected target directory and at least one local staging directory"
|
||||
exit 1
|
||||
fi
|
||||
TARGET=$1
|
||||
|
||||
for ((i=2; i<=$#; i++))
|
||||
do
|
||||
DIR="${!i}"
|
||||
SUB_DIR=$(ls -d "${DIR}"/* | awk -F / '{print $NF}')
|
||||
|
||||
if [ ! -d "${TARGET}/${SUB_DIR}" ]
|
||||
then
|
||||
mkdir -p "${TARGET}/${SUB_DIR}"
|
||||
fi
|
||||
cat "${DIR}"/"${SUB_DIR}"/.index >> "${TARGET}/${SUB_DIR}"/.index
|
||||
cp -r "${DIR}"/"${SUB_DIR}"/* "${TARGET}/${SUB_DIR}"/
|
||||
done
|
28
.github/scripts/release_checkout_tag.sh
vendored
28
.github/scripts/release_checkout_tag.sh
vendored
@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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.
|
||||
# ----------------------------------------------------------------------------
|
||||
set -e
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Expected release.properties file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TAG=$(grep scm.tag= "$1" | cut -d'=' -f2)
|
||||
|
||||
echo "Checkout tag $TAG"
|
||||
git checkout "$TAG"
|
||||
exit 0
|
29
.github/scripts/release_rollback.sh
vendored
29
.github/scripts/release_rollback.sh
vendored
@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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.
|
||||
# ----------------------------------------------------------------------------
|
||||
set -e
|
||||
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "Expected release.properties file, repository name and branch"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TAG=$(grep scm.tag= "$1" | cut -d'=' -f2)
|
||||
git remote set-url origin git@github.com:"$2".git
|
||||
git fetch
|
||||
git checkout "$3"
|
||||
./mvnw -B --file pom.xml release:rollback
|
||||
git push origin :"$TAG"
|
79
.github/workflows/ci-build.yml
vendored
79
.github/workflows/ci-build.yml
vendored
@ -1,79 +0,0 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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.
|
||||
# ----------------------------------------------------------------------------
|
||||
name: Build project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main"]
|
||||
|
||||
schedule:
|
||||
- cron: '30 1 * * 1' # At 01:30 on Monday, every Monday.
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryhandler.count=5 -Dmaven.wagon.httpconnectionManager.ttlSeconds=240
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- setup: linux-x86_64-java11
|
||||
docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml build"
|
||||
docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml run build"
|
||||
|
||||
name: ${{ matrix.setup }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Cache .m2/repository
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ matrix.setup }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-${{ matrix.setup }}-
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
# Enable caching of Docker layers
|
||||
- uses: satackey/action-docker-layer-caching@v0.0.11
|
||||
continue-on-error: true
|
||||
with:
|
||||
key: build-docker-cache-${{ matrix.setup }}-{hash}
|
||||
restore-keys: |
|
||||
build-docker-cache-${{ matrix.setup }}-
|
||||
build-docker-cache-
|
||||
|
||||
- name: Build docker image
|
||||
run: docker-compose ${{ matrix.docker-compose-build }}
|
||||
|
||||
- name: Build project without leak detection
|
||||
run: docker-compose ${{ matrix.docker-compose-run }} | tee build.output
|
||||
|
||||
- name: Checking for test failures
|
||||
run: ./.github/scripts/check_build_result.sh build.output
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: target
|
||||
path: |
|
||||
**/target/surefire-reports/
|
||||
**/hs_err*.log
|
143
.github/workflows/ci-deploy.yml
vendored
143
.github/workflows/ci-deploy.yml
vendored
@ -1,143 +0,0 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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.
|
||||
# ----------------------------------------------------------------------------
|
||||
name: Deploy project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
schedule:
|
||||
- cron: '30 1 * * 1' # At 01:30 on Monday, every Monday.
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryhandler.count=5 -Dmaven.wagon.httpconnectionManager.ttlSeconds=240
|
||||
|
||||
jobs:
|
||||
stage-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- setup: linux-x86_64-java11
|
||||
docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml build"
|
||||
docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml run stage-snapshot"
|
||||
- setup: linux-aarch64
|
||||
docker-compose-build: "-f docker/docker-compose.centos-7.yaml build"
|
||||
docker-compose-run: "-f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-stage-snapshot"
|
||||
|
||||
name: stage-snapshot-${{ matrix.setup }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Cache .m2/repository
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ matrix.setup }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-${{ matrix.setup }}-
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
# Enable caching of Docker layers
|
||||
- uses: satackey/action-docker-layer-caching@v0.0.11
|
||||
env:
|
||||
docker-cache-name: staging-${{ matrix.setup }}-cache-docker
|
||||
continue-on-error: true
|
||||
with:
|
||||
key: ${{ runner.os }}-staging-${{ env.docker-cache-name }}-{hash}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-staging-${{ env.docker-cache-name }}-
|
||||
|
||||
- name: Create local staging directory
|
||||
run: mkdir -p ~/local-staging
|
||||
|
||||
- name: Build docker image
|
||||
run: docker-compose ${{ matrix.docker-compose-build }}
|
||||
|
||||
- name: Stage snapshots to local staging directory
|
||||
run: docker-compose ${{ matrix.docker-compose-run }}
|
||||
|
||||
- name: Upload local staging directory
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.setup }}-local-staging
|
||||
path: ~/local-staging
|
||||
if-no-files-found: error
|
||||
|
||||
deploy-staged-snapshots:
|
||||
runs-on: ubuntu-18.04
|
||||
# Wait until we have staged everything
|
||||
needs: stage-snapshot
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '11'
|
||||
|
||||
# Cache .m2/repository
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-deploy-staged-snapshots-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-deploy-staged-snapshots-
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
# Setup some env to re-use later.
|
||||
- name: Prepare enviroment variables
|
||||
run: |
|
||||
echo "LOCAL_STAGING_DIR=$HOME/local-staging" >> $GITHUB_ENV
|
||||
|
||||
# Hardcode the staging artifacts that need to be downloaded.
|
||||
# These must match the matrix setups. There is currently no way to pull this out of the config.
|
||||
- name: Download linux-aarch64 staging directory
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: linux-aarch64-local-staging
|
||||
path: ~/linux-aarch64-local-staging
|
||||
|
||||
- name: Download linux-x86_64-java11 staging directory
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: linux-x86_64-java11-local-staging
|
||||
path: ~/linux-x86_64-java11-local-staging
|
||||
|
||||
- name: Merge staging repositories
|
||||
run: |
|
||||
mkdir -p ~/local-staging/deferred
|
||||
cat ~/linux-aarch64-local-staging/deferred/.index >> ~/local-staging/deferred/.index
|
||||
cp -r ~/linux-aarch64-local-staging/deferred/* ~/local-staging/deferred/
|
||||
cat ~/linux-x86_64-java11-local-staging/deferred/.index >> ~/local-staging/deferred/.index
|
||||
cp -r ~/linux-x86_64-java11-local-staging/deferred/* ~/local-staging/deferred/
|
||||
|
||||
- uses: s4u/maven-settings-action@v2.2.0
|
||||
with:
|
||||
servers: |
|
||||
[{
|
||||
"id": "sonatype-nexus-snapshots",
|
||||
"username": "${{ secrets.SONATYPE_USERNAME }}",
|
||||
"password": "${{ secrets.SONATYPE_PASSWORD }}"
|
||||
}]
|
||||
|
||||
- name: Deploy local staged artifacts
|
||||
run: ./mvnw -B --file pom.xml org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged -DaltStagingDirectory=$LOCAL_STAGING_DIR
|
54
.github/workflows/ci-pr-reports.yml
vendored
54
.github/workflows/ci-pr-reports.yml
vendored
@ -1,54 +0,0 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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.
|
||||
# ----------------------------------------------------------------------------
|
||||
name: PR Reports
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [ "Build PR" ]
|
||||
types:
|
||||
- completed
|
||||
env:
|
||||
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryhandler.count=5 -Dmaven.wagon.httpconnectionManager.ttlSeconds=240
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ignore-if-missing: [false]
|
||||
include:
|
||||
- setup: linux-x86_64-java11
|
||||
- setup: linux-x86_64-java16
|
||||
- setup: linux-x86_64-java11-boringssl
|
||||
- setup: windows-x86_64-java11-boringssl
|
||||
continue-on-error: ${{ matrix.ignore-if-missing }}
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: dawidd6/action-download-artifact@v2.14.1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
workflow_conclusion: completed
|
||||
commit: ${{ github.event.workflow_run.head_commit.id }}
|
||||
# File location set in ci-pr.yml and must be coordinated.
|
||||
name: test-results-${{ matrix.setup }}
|
||||
- name: Publish Test Report
|
||||
uses: scacap/action-surefire-report@v1.0.13
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
report_paths: '**/target/surefire-reports/TEST-*.xml'
|
||||
commit: ${{ github.event.workflow_run.head_commit.id }}
|
||||
check_name: ${{ matrix.setup }} test reports
|
206
.github/workflows/ci-pr.yml
vendored
206
.github/workflows/ci-pr.yml
vendored
@ -1,206 +0,0 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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.
|
||||
# ----------------------------------------------------------------------------
|
||||
name: Build PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "main"]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryhandler.count=5 -Dmaven.wagon.httpconnectionManager.ttlSeconds=240
|
||||
|
||||
jobs:
|
||||
verify-pr:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '11'
|
||||
# Cache .m2/repository
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-verify-pr-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-verify-pr-
|
||||
${{ runner.os }}-maven-
|
||||
- name: Verify with Maven
|
||||
run: ./mvnw -B -ntp --file pom.xml verify -DskipTests=true
|
||||
|
||||
build-pr-windows:
|
||||
runs-on: windows-2016
|
||||
name: windows-x86_64-java11-boringssl
|
||||
needs: verify-pr
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
|
||||
# Cache .m2/repository
|
||||
# Caching of maven dependencies
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: pr-windows-x86_64-maven-cache-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
pr-windows-x86_64-maven-cache-
|
||||
|
||||
- name: Build project
|
||||
run: ./mvnw.cmd -B -ntp --file pom.xml clean package -Pboringssl -DskipHttp2Testsuite=true -DskipAutobahnTestsuite=true
|
||||
|
||||
- name: Upload Test Results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: test-results-windows-x86_64-java11-boringssl
|
||||
path: '**/target/surefire-reports/TEST-*.xml'
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: build-pr-windows-target
|
||||
path: |
|
||||
**/target/surefire-reports/
|
||||
**/hs_err*.log
|
||||
|
||||
build-pr-aarch64:
|
||||
name: linux-aarch64-verify-native
|
||||
# The host should always be Linux
|
||||
runs-on: ubuntu-20.04
|
||||
needs: verify-pr
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Cache .m2/repository
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-build-pr-aarch64-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-build-pr-aarch64-
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- uses: uraimo/run-on-arch-action@v2.0.9
|
||||
name: Run commands
|
||||
id: runcmd
|
||||
with:
|
||||
arch: aarch64
|
||||
distro: ubuntu20.04
|
||||
|
||||
# Not required, but speeds up builds by storing container images in
|
||||
# a GitHub package registry.
|
||||
githubToken: ${{ github.token }}
|
||||
|
||||
# Mount the .m2/repository
|
||||
dockerRunArgs: |
|
||||
--volume "/home/runner/.m2/repository/:/root/.m2/repository"
|
||||
|
||||
# Install dependencies
|
||||
install: |
|
||||
apt-get update -q -y
|
||||
apt-get install -q -y openjdk-11-jdk autoconf automake libtool make tar maven git
|
||||
|
||||
# Compile native code and the modules it depend on and run NativeLoadingTest. This is enough to ensure
|
||||
# we can load the native module on aarch64
|
||||
#
|
||||
# Use tcnative.classifier that is empty as we don't support using the shared lib version on ubuntu.
|
||||
run: |
|
||||
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-arm64 ./mvnw -B -ntp -pl testsuite-native -am clean package -DskipTests=true -Dcheckstyle.skip=true -DskipNativeTestsuite=false -Dtcnative.classifier=
|
||||
|
||||
build-pr:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- setup: linux-x86_64-java11
|
||||
docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml build"
|
||||
docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml run build-leak"
|
||||
- setup: linux-x86_64-java11-graal
|
||||
docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.graalvm111.yaml build"
|
||||
docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.graalvm111.yaml run build-leak"
|
||||
- setup: linux-x86_64-java16
|
||||
docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.116.yaml build"
|
||||
docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.116.yaml run build-leak"
|
||||
- setup: linux-x86_64-java17
|
||||
docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.117.yaml build"
|
||||
docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.117.yaml run build-leak"
|
||||
- setup: linux-x86_64-java11-boringssl
|
||||
docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml build"
|
||||
docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml run build-leak-boringssl-static"
|
||||
- setup: linux-x86_64-java11-unsafe-buffer
|
||||
docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml build"
|
||||
docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml run build-unsafe-buffer"
|
||||
|
||||
name: ${{ matrix.setup }} build
|
||||
needs: verify-pr
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Cache .m2/repository
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ matrix.setup }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-${{ matrix.setup }}-
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
# Enable caching of Docker layers
|
||||
- uses: satackey/action-docker-layer-caching@v0.0.11
|
||||
continue-on-error: true
|
||||
with:
|
||||
key: build-docker-cache-${{ matrix.setup }}-{hash}
|
||||
restore-keys: |
|
||||
build-docker-cache-${{ matrix.setup }}-
|
||||
build-docker-cache-
|
||||
|
||||
- name: Build docker image
|
||||
run: docker-compose ${{ matrix.docker-compose-build }}
|
||||
|
||||
- name: Build project with leak detection
|
||||
run: docker-compose ${{ matrix.docker-compose-run }} | tee build-leak.output
|
||||
|
||||
- name: Checking for test failures
|
||||
run: ./.github/scripts/check_build_result.sh build-leak.output
|
||||
|
||||
- name: Checking for detected leak
|
||||
run: ./.github/scripts/check_leak.sh build-leak.output
|
||||
|
||||
- name: Upload Test Results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: test-results-${{ matrix.setup }}
|
||||
path: '**/target/surefire-reports/TEST-*.xml'
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: build-${{ matrix.setup }}-target
|
||||
path: |
|
||||
**/target/surefire-reports/
|
||||
**/hs_err*.log
|
249
.github/workflows/ci-release.yml
vendored
249
.github/workflows/ci-release.yml
vendored
@ -1,249 +0,0 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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.
|
||||
# ----------------------------------------------------------------------------
|
||||
name: Release
|
||||
|
||||
on:
|
||||
|
||||
# Releases can only be triggered via the action tab
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryhandler.count=5 -Dmaven.wagon.httpconnectionManager.ttlSeconds=240
|
||||
|
||||
jobs:
|
||||
prepare-release:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '11'
|
||||
|
||||
- name: Setup git configuration
|
||||
run: |
|
||||
git config --global user.email "netty-project-bot@users.noreply.github.com"
|
||||
git config --global user.name "Netty Project Bot"
|
||||
|
||||
- name: Install SSH key
|
||||
uses: shimataro/ssh-key-action@v2
|
||||
with:
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY_PEM }}
|
||||
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
|
||||
|
||||
# Cache .m2/repository
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-prepare-release-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-prepare-release-
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Prepare release with Maven
|
||||
run: |
|
||||
./mvnw -B -ntp --file pom.xml release:prepare -DpreparationGoals=clean -DskipTests=true
|
||||
./mvnw -B -ntp clean
|
||||
|
||||
- name: Checkout tag
|
||||
run: ./.github/scripts/release_checkout_tag.sh release.properties
|
||||
|
||||
- name: Upload workspace
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: prepare-release-workspace
|
||||
path: ${{ github.workspace }}/**
|
||||
|
||||
stage-release-linux:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prepare-release
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- setup: linux-x86_64-java11
|
||||
docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.11.yaml build"
|
||||
docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.11.yaml run stage-release"
|
||||
- setup: linux-aarch64
|
||||
docker-compose-build: "-f docker/docker-compose.centos-7.yaml build"
|
||||
docker-compose-run: "-f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-stage-release"
|
||||
|
||||
name: stage-release-${{ matrix.setup }}
|
||||
|
||||
steps:
|
||||
- name: Download release-workspace
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: prepare-release-workspace
|
||||
path: ./prepare-release-workspace/
|
||||
|
||||
- name: Adjust mvnw permissions
|
||||
run: chmod 755 ./prepare-release-workspace/mvnw
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '11'
|
||||
|
||||
- name: Setup git configuration
|
||||
run: |
|
||||
git config --global user.email "netty-project-bot@users.noreply.github.com"
|
||||
git config --global user.name "Netty Project Bot"
|
||||
|
||||
- name: Install SSH key
|
||||
uses: shimataro/ssh-key-action@v2
|
||||
with:
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY_PEM }}
|
||||
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
|
||||
|
||||
# Enable caching of Docker layers
|
||||
- uses: satackey/action-docker-layer-caching@v0.0.11
|
||||
continue-on-error: true
|
||||
with:
|
||||
key: ${{ runner.os }}-staging-docker-cache-${{ matrix.setup }}-{hash}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-staging-docker-cache-${{ matrix.setup }}-
|
||||
${{ runner.os }}-staging-docker-cache-
|
||||
|
||||
- uses: s4u/maven-settings-action@v2.2.0
|
||||
with:
|
||||
servers: |
|
||||
[{
|
||||
"id": "sonatype-nexus-staging",
|
||||
"username": "${{ secrets.SONATYPE_USERNAME }}",
|
||||
"password": "${{ secrets.SONATYPE_PASSWORD }}"
|
||||
}]
|
||||
|
||||
# Cache .m2/repository
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ matrix.setup }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-${{ matrix.setup }}-
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Create local staging directory
|
||||
run: mkdir -p ~/local-staging
|
||||
|
||||
- name: Build docker image
|
||||
working-directory: ./prepare-release-workspace/
|
||||
run: docker-compose ${{ matrix.docker-compose-build }}
|
||||
|
||||
- name: Stage release to local staging directory
|
||||
working-directory: ./prepare-release-workspace/
|
||||
env:
|
||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
|
||||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||
run: docker-compose ${{ matrix.docker-compose-run }}
|
||||
|
||||
- name: Upload local staging directory
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.setup }}-local-staging
|
||||
path: ~/local-staging
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Rollback release on failure
|
||||
working-directory: ./prepare-release-workspace/
|
||||
if: ${{ failure() }}
|
||||
# Rollback the release in case of an failure
|
||||
run: bash ./.github/scripts/release_rollback.sh release.properties netty/netty main
|
||||
|
||||
deploy-staged-release:
|
||||
runs-on: ubuntu-18.04
|
||||
# Wait until we have staged everything
|
||||
needs: stage-release-linux
|
||||
steps:
|
||||
- name: Download release-workspace
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: prepare-release-workspace
|
||||
path: ./prepare-release-workspace/
|
||||
|
||||
- name: Adjust mvnw permissions
|
||||
run: chmod 755 ./prepare-release-workspace/mvnw
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '11'
|
||||
|
||||
- name: Setup git configuration
|
||||
run: |
|
||||
git config --global user.email "netty-project-bot@users.noreply.github.com"
|
||||
git config --global user.name "Netty Project Bot"
|
||||
|
||||
- name: Install SSH key
|
||||
uses: shimataro/ssh-key-action@v2
|
||||
with:
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY_PEM }}
|
||||
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
|
||||
|
||||
# Hardcode the staging artifacts that need to be downloaded.
|
||||
# These must match the matrix setups. There is currently no way to pull this out of the config.
|
||||
- name: Download linux-aarch64 staging directory
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: linux-aarch64-local-staging
|
||||
path: ~/linux-aarch64-local-staging
|
||||
|
||||
- name: Download linux-x86_64-java11 staging directory
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: linux-x86_64-java11-local-staging
|
||||
path: ~/linux-x86_64-java11-local-staging
|
||||
|
||||
# This step takes care of merging all the previous staged repositories in a way that will allow us to deploy
|
||||
# all together with one maven command.
|
||||
- name: Merge staging repositories
|
||||
working-directory: ./prepare-release-workspace/
|
||||
run: bash ./.github/scripts/merge_local_staging.sh /home/runner/local-staging/staging ~/linux-aarch64-local-staging/staging ~/linux-x86_64-java11-local-staging/staging
|
||||
|
||||
- uses: s4u/maven-settings-action@v2.2.0
|
||||
with:
|
||||
servers: |
|
||||
[{
|
||||
"id": "sonatype-nexus-staging",
|
||||
"username": "${{ secrets.SONATYPE_USERNAME }}",
|
||||
"password": "${{ secrets.SONATYPE_PASSWORD }}"
|
||||
}]
|
||||
|
||||
# Cache .m2/repository
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-deploy-staged-release-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-deploy-staged-release-
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Deploy local staged artifacts
|
||||
working-directory: ./prepare-release-workspace/
|
||||
# If we don't want to close the repository we can add -DskipStagingRepositoryClose=true
|
||||
run: ./mvnw -B -ntp --file pom.xml org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged -DnexusUrl=https://oss.sonatype.org -DserverId=sonatype-nexus-staging -DaltStagingDirectory=/home/runner/local-staging -DskipStagingRepositoryClose=true
|
||||
|
||||
- name: Rollback release on failure
|
||||
working-directory: ./prepare-release-workspace/
|
||||
if: ${{ failure() }}
|
||||
# Rollback the release in case of an failure
|
||||
run: bash ./.github/scripts/release_rollback.sh release.properties netty/netty main
|
102
.github/workflows/codeql-analysis.yml
vendored
102
.github/workflows/codeql-analysis.yml
vendored
@ -1,102 +0,0 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# Copyright 2021 The Netty Project
|
||||
#
|
||||
# The Netty Project 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:
|
||||
#
|
||||
# https://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 most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["4.1", main]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: ["4.1", main]
|
||||
schedule:
|
||||
- cron: '0 13 * * 3'
|
||||
|
||||
env:
|
||||
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryhandler.count=5 -Dmaven.wagon.httpconnectionManager.ttlSeconds=240
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['java', 'cpp' ]
|
||||
# Learn more...
|
||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# Cache .m2/repository
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ matrix.language }} ${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-${{ matrix.language }}
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
# - name: Autobuild
|
||||
# uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '11' # The JDK version to make available on the path.
|
||||
|
||||
- name: Compile project
|
||||
run: ./mvnw -B -ntp clean package -DskipTests=true
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Binary file not shown.
1
.mvn/wrapper/maven-wrapper.properties
vendored
1
.mvn/wrapper/maven-wrapper.properties
vendored
@ -1 +0,0 @@
|
||||
distributionUrl=https://downloads.apache.org/maven/maven-3/3.8.1/binaries/apache-maven-3.8.1-bin.zip
|
52
README.md
52
README.md
@ -33,32 +33,32 @@ Netty can be used in modular JDK9+ applications as a collection of automatic mod
|
||||
reverse-DNS style, and are derived from subproject names rather than root packages due to historical reasons. They
|
||||
are listed below:
|
||||
|
||||
* `io.netty.all`
|
||||
* `io.netty.buffer`
|
||||
* `io.netty.codec`
|
||||
* `io.netty.codec.dns`
|
||||
* `io.netty.codec.haproxy`
|
||||
* `io.netty.codec.http`
|
||||
* `io.netty.codec.http2`
|
||||
* `io.netty.codec.memcache`
|
||||
* `io.netty.codec.mqtt`
|
||||
* `io.netty.codec.redis`
|
||||
* `io.netty.codec.smtp`
|
||||
* `io.netty.codec.socks`
|
||||
* `io.netty.codec.stomp`
|
||||
* `io.netty.codec.xml`
|
||||
* `io.netty.common`
|
||||
* `io.netty.handler`
|
||||
* `io.netty.handler.proxy`
|
||||
* `io.netty.resolver`
|
||||
* `io.netty.resolver.dns`
|
||||
* `io.netty.transport`
|
||||
* `io.netty.transport.epoll` (`native` omitted - reserved keyword in Java)
|
||||
* `io.netty.transport.kqueue` (`native` omitted - reserved keyword in Java)
|
||||
* `io.netty.transport.unix.common` (`native` omitted - reserved keyword in Java)
|
||||
* `io.netty.transport.rxtx`
|
||||
* `io.netty.transport.sctp`
|
||||
* `io.netty.transport.udt`
|
||||
* `io.net5.all`
|
||||
* `io.net5.buffer`
|
||||
* `io.net5.codec`
|
||||
* `io.net5.codec.dns`
|
||||
* `io.net5.codec.haproxy`
|
||||
* `io.net5.codec.http`
|
||||
* `io.net5.codec.http2`
|
||||
* `io.net5.codec.memcache`
|
||||
* `io.net5.codec.mqtt`
|
||||
* `io.net5.codec.redis`
|
||||
* `io.net5.codec.smtp`
|
||||
* `io.net5.codec.socks`
|
||||
* `io.net5.codec.stomp`
|
||||
* `io.net5.codec.xml`
|
||||
* `io.net5.common`
|
||||
* `io.net5.handler`
|
||||
* `io.net5.handler.proxy`
|
||||
* `io.net5.resolver`
|
||||
* `io.net5.resolver.dns`
|
||||
* `io.net5.transport`
|
||||
* `io.net5.transport.epoll` (`native` omitted - reserved keyword in Java)
|
||||
* `io.net5.transport.kqueue` (`native` omitted - reserved keyword in Java)
|
||||
* `io.net5.transport.unix.common` (`native` omitted - reserved keyword in Java)
|
||||
* `io.net5.transport.rxtx`
|
||||
* `io.net5.transport.sctp`
|
||||
* `io.net5.transport.udt`
|
||||
|
||||
|
||||
|
||||
|
659
all/pom.xml
659
all/pom.xml
@ -1,659 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 2012 The Netty Project
|
||||
~
|
||||
~ The Netty Project 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:
|
||||
~
|
||||
~ https://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.
|
||||
-->
|
||||
<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 https://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-parent</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>netty-all</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Netty/All-in-One</name>
|
||||
|
||||
<properties>
|
||||
<generatedSourceDir>${project.build.directory}/src</generatedSourceDir>
|
||||
<dependencyVersionsDir>${project.build.directory}/versions</dependencyVersionsDir>
|
||||
<japicmp.skip>true</japicmp.skip>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-bom</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<profiles>
|
||||
<!-- If the uber profile is used it will automatically fetch the missing native jar from maven and add it to the all jar as well. -->
|
||||
<profile>
|
||||
<id>uber-staging</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>staged-releases</id>
|
||||
<name>Staged Releases</name>
|
||||
<url>https://oss.sonatype.org/service/local/repositories/${stagingRepositoryId}/content/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<!-- Depend on all our native jars -->
|
||||
<!-- As this is executed on either macOS or Linux we directly need to specify the classifier -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<classifier>linux-x86_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<classifier>linux-aarch_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<classifier>osx-x86_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<classifier>osx-aarch_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<classifier>osx-x86_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<classifier>osx-aarch_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>uber-snapshot</id>
|
||||
|
||||
<dependencies>
|
||||
<!-- Depend on all our native jars -->
|
||||
<!-- As this is executed on either macOS or Linux we directly need to specify the classifier -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<classifier>linux-x86_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<classifier>linux-aarch_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<classifier>osx-x86_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<classifier>osx-aarch_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<classifier>osx-x86_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<classifier>osx-aarch_64</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
|
||||
<!-- The linux profile will only include the native jar for epoll to the all jar.
|
||||
If you want to also include the native jar for kqueue use -Puber.
|
||||
-->
|
||||
<profile>
|
||||
<id>linux</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>linux</family>
|
||||
</os>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<!-- All release modules -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>${jni.classifier}</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- Just include the classes for the other platform so these are at least present in the netty-all artifact -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<!-- The mac, openbsd and freebsd profile will only include the native jar for epol to the all jar.
|
||||
If you want to also include the native jar for kqueue use -Puber.
|
||||
-->
|
||||
<profile>
|
||||
<id>mac</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>mac</family>
|
||||
</os>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<!-- All release modules -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>${jni.classifier}</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>${jni.classifier}</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- Just include the classes for the other platform so these are at least present in the netty-all artifact -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>freebsd</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>unix</family>
|
||||
<name>freebsd</name>
|
||||
</os>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<!-- All release modules -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>${jni.classifier}</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- Just include the classes for the other platform so these are at least present in the netty-all artifact -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>openbsd</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>unix</family>
|
||||
<name>openbsd</name>
|
||||
</os>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<!-- All release modules -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>${jni.classifier}</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- Just include the classes for the other platform so these are at least present in the netty-all artifact -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
<!-- All release modules -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-buffer</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec-dns</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec-haproxy</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec-http</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec-http2</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec-memcache</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec-mqtt</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec-redis</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec-smtp</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec-socks</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec-stomp</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-codec-xml</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-common</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-handler</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-handler-proxy</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-resolver</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-resolver-dns</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>netty-transport-sctp</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>clean-first</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<!-- Populate the properties whose key is groupId:artifactId:type
|
||||
and whose value is the path to the artifact -->
|
||||
<execution>
|
||||
<id>locate-dependencies</id>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>properties</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<!-- Unpack all source files -->
|
||||
<execution>
|
||||
<id>unpack-sources</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<classifier>sources</classifier>
|
||||
<includes>io/netty/**</includes>
|
||||
<includeScope>runtime</includeScope>
|
||||
<includeGroupIds>${project.groupId}</includeGroupIds>
|
||||
<outputDirectory>${generatedSourceDir}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<!-- Unpack all class files -->
|
||||
<execution>
|
||||
<id>unpack-jars</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludes>io/netty/internal/tcnative/**,io/netty/example/**,META-INF/native/libnetty_tcnative*,META-INF/native/include/**,META-INF/native/**/*.a</excludes>
|
||||
<includes>io/netty/**,META-INF/native/**,META-INF/native-image/**</includes>
|
||||
<includeScope>runtime</includeScope>
|
||||
<includeGroupIds>${project.groupId}</includeGroupIds>
|
||||
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<!-- Instead of generating a new version property file, merge others' version property files into one. -->
|
||||
<execution>
|
||||
<id>write-version-properties</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>merge-version-properties</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<taskdef resource="net/sf/antcontrib/antlib.xml" />
|
||||
<propertyselector property="versions" match="^(${project.groupId}:(?!netty-example)[^:]+:jar(?::[^:]+)?)$" select="\1" />
|
||||
<for list="${versions}" param="x">
|
||||
<sequential>
|
||||
<unzip src="${@{x}}" dest="${dependencyVersionsDir}">
|
||||
<patternset>
|
||||
<include name="META-INF/${project.groupId}.versions.properties" />
|
||||
</patternset>
|
||||
</unzip>
|
||||
<concat destfile="${project.build.outputDirectory}/META-INF/${project.groupId}.versions.properties" append="true">
|
||||
<path path="${dependencyVersionsDir}/META-INF/${project.groupId}.versions.properties" />
|
||||
</concat>
|
||||
</sequential>
|
||||
</for>
|
||||
<delete dir="${dependencyVersionsDir}" quiet="true" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<!-- Clean everything once finished so that IDE doesn't find the unpacked files. -->
|
||||
<execution>
|
||||
<id>clean-source-directory</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<delete dir="${generatedSourceDir}" quiet="true" />
|
||||
<delete dir="${dependencyVersionsDir}" quiet="true" />
|
||||
<delete dir="${project.build.outputDirectory}" quiet="true" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Include the directory where the source files were unpacked -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-source</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>${generatedSourceDir}</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Disable OSGi bundle manifest generation -->
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-manifest</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Override the default JAR configuration -->
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-jar</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>all-in-one-jar</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
||||
</manifest>
|
||||
<manifestEntries>
|
||||
<Automatic-Module-Name>io.netty.all</Automatic-Module-Name>
|
||||
</manifestEntries>
|
||||
<index>true</index>
|
||||
</archive>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Disable animal sniffer -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Disable checkstyle -->
|
||||
<plugin>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>check-style</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Disable all plugin executions configured by jar packaging -->
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-resources</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>default-testResources</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-compile</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>default-testCompile</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-test</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
261
bom/pom.xml
261
bom/pom.xml
@ -16,14 +16,15 @@
|
||||
-->
|
||||
<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 https://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
<artifactId>oss-parent</artifactId>
|
||||
<version>7</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>mchv-snapshot</id>
|
||||
<name>MCHV Apache Snapshot Maven Packages Distribution</name>
|
||||
<url>https://mvn.mchv.eu/repository/mchv-snapshot</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<groupId>io.netty</groupId>
|
||||
<groupId>io.net5</groupId>
|
||||
<artifactId>netty-bom</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
@ -65,265 +66,25 @@
|
||||
|
||||
<properties>
|
||||
<!-- Keep in sync with ../pom.xml -->
|
||||
<tcnative.version>2.0.43.Final</tcnative.version>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- All release modules -->
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<groupId>io.net5</groupId>
|
||||
<artifactId>netty-buffer</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-dns</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-haproxy</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-http</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-http2</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-memcache</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-mqtt</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-redis</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-smtp</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-socks</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-stomp</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-xml</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<groupId>io.net5</groupId>
|
||||
<artifactId>netty-common</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<groupId>io.net5</groupId>
|
||||
<artifactId>netty-dev-tools</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-handler</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-handler-proxy</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-resolver</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-resolver-dns</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-sctp</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-example</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-all</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
<classifier>osx-x86_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
<classifier>osx-aarch_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-unix-common</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-unix-common</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
<classifier>linux-aarch_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-unix-common</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
<classifier>linux-x86_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-unix-common</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
<classifier>osx-x86_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-unix-common</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
<classifier>osx-aarch_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
<classifier>linux-aarch_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
<classifier>linux-x86_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
<classifier>osx-x86_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
<classifier>osx-aarch_64</classifier>
|
||||
</dependency>
|
||||
<!-- Add netty-tcnative* as well as users need to ensure they use the correct version -->
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative</artifactId>
|
||||
<version>${tcnative.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative</artifactId>
|
||||
<version>${tcnative.version}</version>
|
||||
<classifier>linux-x86_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative</artifactId>
|
||||
<version>${tcnative.version}</version>
|
||||
<classifier>linux-aarch_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative</artifactId>
|
||||
<version>${tcnative.version}</version>
|
||||
<classifier>osx-x86_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative-boringssl-static</artifactId>
|
||||
<version>${tcnative.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative-boringssl-static</artifactId>
|
||||
<version>${tcnative.version}</version>
|
||||
<classifier>linux-x86_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative-boringssl-static</artifactId>
|
||||
<version>${tcnative.version}</version>
|
||||
<classifier>linux-aarch_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative-boringssl-static</artifactId>
|
||||
<version>${tcnative.version}</version>
|
||||
<classifier>osx-x86_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative-boringssl-static</artifactId>
|
||||
<version>${tcnative.version}</version>
|
||||
<classifier>osx-aarch_64</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative-boringssl-static</artifactId>
|
||||
<version>${tcnative.version}</version>
|
||||
<classifier>windows-x86_64</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
@ -18,7 +18,7 @@
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>io.netty</groupId>
|
||||
<groupId>io.net5</groupId>
|
||||
<artifactId>netty-parent</artifactId>
|
||||
<version>5.0.0.Final-SNAPSHOT</version>
|
||||
</parent>
|
||||
@ -29,7 +29,7 @@
|
||||
<name>Netty/Buffer</name>
|
||||
|
||||
<properties>
|
||||
<javaModuleName>io.netty.buffer</javaModuleName>
|
||||
<javaModuleName>io.net5.buffer</javaModuleName>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -13,18 +13,18 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.AsciiString;
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.CharsetUtil;
|
||||
import io.netty.util.IllegalReferenceCountException;
|
||||
import io.netty.util.ResourceLeakDetector;
|
||||
import io.netty.util.ResourceLeakDetectorFactory;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.netty.util.internal.SystemPropertyUtil;
|
||||
import io.netty.util.internal.logging.InternalLogger;
|
||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||
import io.net5.util.AsciiString;
|
||||
import io.net5.util.ByteProcessor;
|
||||
import io.net5.util.CharsetUtil;
|
||||
import io.net5.util.IllegalReferenceCountException;
|
||||
import io.net5.util.ResourceLeakDetector;
|
||||
import io.net5.util.ResourceLeakDetectorFactory;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
import io.net5.util.internal.SystemPropertyUtil;
|
||||
import io.net5.util.internal.logging.InternalLogger;
|
||||
import io.net5.util.internal.logging.InternalLoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -36,8 +36,8 @@ import java.nio.channels.GatheringByteChannel;
|
||||
import java.nio.channels.ScatteringByteChannel;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
import static io.netty.util.internal.MathUtil.isOutOfBounds;
|
||||
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static io.net5.util.internal.MathUtil.isOutOfBounds;
|
||||
import static io.net5.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
/**
|
||||
@ -45,9 +45,9 @@ import static java.util.Objects.requireNonNull;
|
||||
*/
|
||||
public abstract class AbstractByteBuf extends ByteBuf {
|
||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(AbstractByteBuf.class);
|
||||
private static final String PROP_CHECK_ACCESSIBLE = "io.netty.buffer.checkAccessible";
|
||||
private static final String PROP_CHECK_ACCESSIBLE = "io.net5.buffer.checkAccessible";
|
||||
static final boolean checkAccessible; // accessed from CompositeByteBuf
|
||||
private static final String PROP_CHECK_BOUNDS = "io.netty.buffer.checkBounds";
|
||||
private static final String PROP_CHECK_BOUNDS = "io.net5.buffer.checkBounds";
|
||||
private static final boolean checkBounds;
|
||||
|
||||
static {
|
@ -14,15 +14,15 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static io.net5.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
|
||||
import io.netty.util.ResourceLeakDetector;
|
||||
import io.netty.util.ResourceLeakTracker;
|
||||
import io.netty.util.internal.MathUtil;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.net5.util.ResourceLeakDetector;
|
||||
import io.net5.util.ResourceLeakTracker;
|
||||
import io.net5.util.internal.MathUtil;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
|
||||
/**
|
||||
* Skeletal {@link ByteBufAllocator} implementation to extend.
|
@ -14,7 +14,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
@ -14,9 +14,9 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.ObjectPool.Handle;
|
||||
import io.net5.util.internal.ObjectPool.Handle;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
@ -14,11 +14,11 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
|
||||
|
||||
import io.netty.util.internal.ReferenceCountUpdater;
|
||||
import io.net5.util.internal.ReferenceCountUpdater;
|
||||
|
||||
/**
|
||||
* Abstract base class for {@link ByteBuf} implementations that count references.
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.net5.util.ByteProcessor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -27,7 +27,7 @@ import java.nio.channels.GatheringByteChannel;
|
||||
import java.nio.channels.ScatteringByteChannel;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
import static io.netty.util.internal.MathUtil.isOutOfBounds;
|
||||
import static io.net5.util.internal.MathUtil.isOutOfBounds;
|
||||
|
||||
abstract class AbstractUnpooledSlicedByteBuf extends AbstractDerivedByteBuf {
|
||||
private final ByteBuf buffer;
|
@ -13,13 +13,13 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
import static io.netty.util.internal.PlatformDependent.BIG_ENDIAN_NATIVE_ORDER;
|
||||
import static io.net5.util.internal.PlatformDependent.BIG_ENDIAN_NATIVE_ORDER;
|
||||
|
||||
/**
|
||||
* Special {@link SwappedByteBuf} for {@link ByteBuf}s that is using unsafe.
|
@ -14,14 +14,14 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.ResourceLeakDetector;
|
||||
import io.netty.util.ResourceLeakTracker;
|
||||
import io.netty.util.internal.SystemPropertyUtil;
|
||||
import io.netty.util.internal.logging.InternalLogger;
|
||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||
import io.net5.util.ByteProcessor;
|
||||
import io.net5.util.ResourceLeakDetector;
|
||||
import io.net5.util.ResourceLeakTracker;
|
||||
import io.net5.util.internal.SystemPropertyUtil;
|
||||
import io.net5.util.internal.logging.InternalLogger;
|
||||
import io.net5.util.internal.logging.InternalLoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -36,7 +36,7 @@ import java.nio.charset.Charset;
|
||||
final class AdvancedLeakAwareByteBuf extends SimpleLeakAwareByteBuf {
|
||||
|
||||
// If set to true we will only record stacktraces for touch(...), release(...) and retain(...) calls.
|
||||
private static final String PROP_ACQUIRE_AND_RELEASE_ONLY = "io.netty.leakDetection.acquireAndReleaseOnly";
|
||||
private static final String PROP_ACQUIRE_AND_RELEASE_ONLY = "io.net5.leakDetection.acquireAndReleaseOnly";
|
||||
private static final boolean ACQUIRE_AND_RELEASE_ONLY;
|
||||
|
||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(AdvancedLeakAwareByteBuf.class);
|
@ -13,11 +13,11 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.ResourceLeakTracker;
|
||||
import io.net5.util.ByteProcessor;
|
||||
import io.net5.util.ResourceLeakTracker;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -31,7 +31,7 @@ import java.nio.charset.Charset;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import static io.netty.buffer.AdvancedLeakAwareByteBuf.recordLeakNonRefCountingOperation;
|
||||
import static io.net5.buffer.AdvancedLeakAwareByteBuf.recordLeakNonRefCountingOperation;
|
||||
|
||||
final class AdvancedLeakAwareCompositeByteBuf extends SimpleLeakAwareCompositeByteBuf {
|
||||
|
@ -13,10 +13,10 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.ReferenceCounted;
|
||||
import io.net5.util.ByteProcessor;
|
||||
import io.net5.util.ReferenceCounted;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
/**
|
||||
* Implementations are responsible to allocate buffers. Implementations of this interface are expected to be
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
public interface ByteBufAllocatorMetric {
|
||||
/**
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
public interface ByteBufAllocatorMetricProvider {
|
||||
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
/**
|
||||
* An interface that can be implemented by any object that know how to turn itself into a {@link ByteBuf}.
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.ReferenceCounted;
|
||||
import io.net5.util.ReferenceCounted;
|
||||
|
||||
/**
|
||||
* A packet which is send or receive.
|
@ -13,13 +13,13 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static io.net5.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
|
||||
import io.netty.util.ReferenceCounted;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.net5.util.ReferenceCounted;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataInputStream;
|
@ -13,11 +13,11 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import io.netty.util.CharsetUtil;
|
||||
import io.net5.util.CharsetUtil;
|
||||
|
||||
import java.io.DataOutput;
|
||||
import java.io.DataOutputStream;
|
@ -14,9 +14,9 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.net5.util.ByteProcessor;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link ByteProcessor}.
|
@ -13,21 +13,21 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.AsciiString;
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.CharsetUtil;
|
||||
import io.netty.util.IllegalReferenceCountException;
|
||||
import io.netty.util.concurrent.FastThreadLocal;
|
||||
import io.netty.util.internal.MathUtil;
|
||||
import io.netty.util.internal.ObjectPool;
|
||||
import io.netty.util.internal.ObjectPool.Handle;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.netty.util.internal.SystemPropertyUtil;
|
||||
import io.netty.util.internal.logging.InternalLogger;
|
||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||
import io.net5.util.AsciiString;
|
||||
import io.net5.util.ByteProcessor;
|
||||
import io.net5.util.CharsetUtil;
|
||||
import io.net5.util.IllegalReferenceCountException;
|
||||
import io.net5.util.concurrent.FastThreadLocal;
|
||||
import io.net5.util.internal.MathUtil;
|
||||
import io.net5.util.internal.ObjectPool;
|
||||
import io.net5.util.internal.ObjectPool.Handle;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
import io.net5.util.internal.SystemPropertyUtil;
|
||||
import io.net5.util.internal.logging.InternalLogger;
|
||||
import io.net5.util.internal.logging.InternalLoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
@ -43,10 +43,10 @@ import java.nio.charset.CodingErrorAction;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
import static io.netty.util.internal.MathUtil.isOutOfBounds;
|
||||
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static io.netty.util.internal.StringUtil.NEWLINE;
|
||||
import static io.netty.util.internal.StringUtil.isSurrogate;
|
||||
import static io.net5.util.internal.MathUtil.isOutOfBounds;
|
||||
import static io.net5.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static io.net5.util.internal.StringUtil.NEWLINE;
|
||||
import static io.net5.util.internal.StringUtil.isSurrogate;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
/**
|
||||
@ -74,28 +74,28 @@ public final class ByteBufUtil {
|
||||
|
||||
static {
|
||||
String allocType = SystemPropertyUtil.get(
|
||||
"io.netty.allocator.type", PlatformDependent.isAndroid() ? "unpooled" : "pooled");
|
||||
"io.net5.allocator.type", PlatformDependent.isAndroid() ? "unpooled" : "pooled");
|
||||
allocType = allocType.toLowerCase(Locale.US).trim();
|
||||
|
||||
ByteBufAllocator alloc;
|
||||
if ("unpooled".equals(allocType)) {
|
||||
alloc = UnpooledByteBufAllocator.DEFAULT;
|
||||
logger.debug("-Dio.netty.allocator.type: {}", allocType);
|
||||
logger.debug("-Dio.net5.allocator.type: {}", allocType);
|
||||
} else if ("pooled".equals(allocType)) {
|
||||
alloc = PooledByteBufAllocator.DEFAULT;
|
||||
logger.debug("-Dio.netty.allocator.type: {}", allocType);
|
||||
logger.debug("-Dio.net5.allocator.type: {}", allocType);
|
||||
} else {
|
||||
alloc = PooledByteBufAllocator.DEFAULT;
|
||||
logger.debug("-Dio.netty.allocator.type: pooled (unknown: {})", allocType);
|
||||
logger.debug("-Dio.net5.allocator.type: pooled (unknown: {})", allocType);
|
||||
}
|
||||
|
||||
DEFAULT_ALLOCATOR = alloc;
|
||||
|
||||
THREAD_LOCAL_BUFFER_SIZE = SystemPropertyUtil.getInt("io.netty.threadLocalDirectBufferSize", 0);
|
||||
logger.debug("-Dio.netty.threadLocalDirectBufferSize: {}", THREAD_LOCAL_BUFFER_SIZE);
|
||||
THREAD_LOCAL_BUFFER_SIZE = SystemPropertyUtil.getInt("io.net5.threadLocalDirectBufferSize", 0);
|
||||
logger.debug("-Dio.net5.threadLocalDirectBufferSize: {}", THREAD_LOCAL_BUFFER_SIZE);
|
||||
|
||||
MAX_CHAR_BUFFER_SIZE = SystemPropertyUtil.getInt("io.netty.maxThreadLocalCharBufferSize", 16 * 1024);
|
||||
logger.debug("-Dio.netty.maxThreadLocalCharBufferSize: {}", MAX_CHAR_BUFFER_SIZE);
|
||||
MAX_CHAR_BUFFER_SIZE = SystemPropertyUtil.getInt("io.net5.maxThreadLocalCharBufferSize", 16 * 1024);
|
||||
logger.debug("-Dio.net5.maxThreadLocalCharBufferSize: {}", MAX_CHAR_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
static final int MAX_TL_ARRAY_LEN = 1024;
|
@ -13,15 +13,15 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.IllegalReferenceCountException;
|
||||
import io.netty.util.ReferenceCountUtil;
|
||||
import io.netty.util.internal.EmptyArrays;
|
||||
import io.netty.util.internal.RecyclableArrayList;
|
||||
import io.net5.util.ByteProcessor;
|
||||
import io.net5.util.IllegalReferenceCountException;
|
||||
import io.net5.util.ReferenceCountUtil;
|
||||
import io.net5.util.internal.EmptyArrays;
|
||||
import io.net5.util.internal.RecyclableArrayList;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,11 +13,11 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
|
||||
/**
|
||||
* Default implementation of a {@link ByteBufHolder} that holds it's data in a {@link ByteBuf}.
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.net5.util.ByteProcessor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -14,15 +14,15 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static io.net5.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.internal.EmptyArrays;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.net5.util.ByteProcessor;
|
||||
import io.net5.util.internal.EmptyArrays;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
@ -13,10 +13,10 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.EmptyArrays;
|
||||
import io.netty.util.internal.RecyclableArrayList;
|
||||
import io.net5.util.internal.EmptyArrays;
|
||||
import io.net5.util.internal.RecyclableArrayList;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
/**
|
||||
* Utility class for heap buffers.
|
@ -14,10 +14,10 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
@ -26,7 +26,7 @@ import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.LongAdder;
|
||||
|
||||
import static io.netty.buffer.PoolChunk.isSubpage;
|
||||
import static io.net5.buffer.PoolChunk.isSubpage;
|
||||
import static java.lang.Math.max;
|
||||
|
||||
abstract class PoolArena<T> extends SizeClasses implements PoolArenaMetric {
|
@ -14,7 +14,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -13,10 +13,10 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.LongLongHashMap;
|
||||
import io.netty.util.internal.LongPriorityQueue;
|
||||
import io.net5.util.internal.LongLongHashMap;
|
||||
import io.net5.util.internal.LongPriorityQueue;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayDeque;
|
@ -14,9 +14,9 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
/**
|
||||
* Metrics for a list of chunks.
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
/**
|
||||
* Metrics for a chunk.
|
@ -14,13 +14,13 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static io.netty.buffer.PoolChunk.RUN_OFFSET_SHIFT;
|
||||
import static io.netty.buffer.PoolChunk.SIZE_SHIFT;
|
||||
import static io.netty.buffer.PoolChunk.IS_USED_SHIFT;
|
||||
import static io.netty.buffer.PoolChunk.IS_SUBPAGE_SHIFT;
|
||||
import static io.netty.buffer.SizeClasses.LOG2_QUANTUM;
|
||||
import static io.net5.buffer.PoolChunk.RUN_OFFSET_SHIFT;
|
||||
import static io.net5.buffer.PoolChunk.SIZE_SHIFT;
|
||||
import static io.net5.buffer.PoolChunk.IS_USED_SHIFT;
|
||||
import static io.net5.buffer.PoolChunk.IS_SUBPAGE_SHIFT;
|
||||
import static io.net5.buffer.SizeClasses.LOG2_QUANTUM;
|
||||
|
||||
final class PoolSubpage<T> implements PoolSubpageMetric {
|
||||
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
/**
|
||||
* Metrics for a sub-page.
|
@ -14,18 +14,18 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
|
||||
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static io.net5.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
|
||||
import io.netty.buffer.PoolArena.SizeClass;
|
||||
import io.netty.util.internal.MathUtil;
|
||||
import io.netty.util.internal.ObjectPool;
|
||||
import io.netty.util.internal.ObjectPool.Handle;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.netty.util.internal.logging.InternalLogger;
|
||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||
import io.net5.buffer.PoolArena.SizeClass;
|
||||
import io.net5.util.internal.MathUtil;
|
||||
import io.net5.util.internal.ObjectPool;
|
||||
import io.net5.util.internal.ObjectPool.Handle;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.logging.InternalLogger;
|
||||
import io.net5.util.internal.logging.InternalLoggerFactory;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
@ -14,9 +14,9 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.ObjectPool.Handle;
|
||||
import io.net5.util.internal.ObjectPool.Handle;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
@ -14,20 +14,20 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static io.net5.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
|
||||
import io.netty.util.NettyRuntime;
|
||||
import io.netty.util.concurrent.EventExecutor;
|
||||
import io.netty.util.concurrent.FastThreadLocal;
|
||||
import io.netty.util.concurrent.FastThreadLocalThread;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.netty.util.internal.SystemPropertyUtil;
|
||||
import io.netty.util.internal.ThreadExecutorMap;
|
||||
import io.netty.util.internal.logging.InternalLogger;
|
||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||
import io.net5.util.NettyRuntime;
|
||||
import io.net5.util.concurrent.EventExecutor;
|
||||
import io.net5.util.concurrent.FastThreadLocal;
|
||||
import io.net5.util.concurrent.FastThreadLocalThread;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
import io.net5.util.internal.SystemPropertyUtil;
|
||||
import io.net5.util.internal.ThreadExecutorMap;
|
||||
import io.net5.util.internal.logging.InternalLogger;
|
||||
import io.net5.util.internal.logging.InternalLoggerFactory;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
@ -59,8 +59,8 @@ public class PooledByteBufAllocator extends AbstractByteBufAllocator implements
|
||||
|
||||
static {
|
||||
int defaultAlignment = SystemPropertyUtil.getInt(
|
||||
"io.netty.allocator.directMemoryCacheAlignment", 0);
|
||||
int defaultPageSize = SystemPropertyUtil.getInt("io.netty.allocator.pageSize", 8192);
|
||||
"io.net5.allocator.directMemoryCacheAlignment", 0);
|
||||
int defaultPageSize = SystemPropertyUtil.getInt("io.net5.allocator.pageSize", 8192);
|
||||
Throwable pageSizeFallbackCause = null;
|
||||
try {
|
||||
validateAndCalculatePageShifts(defaultPageSize, defaultAlignment);
|
||||
@ -72,7 +72,7 @@ public class PooledByteBufAllocator extends AbstractByteBufAllocator implements
|
||||
DEFAULT_PAGE_SIZE = defaultPageSize;
|
||||
DEFAULT_DIRECT_MEMORY_CACHE_ALIGNMENT = defaultAlignment;
|
||||
|
||||
int defaultMaxOrder = SystemPropertyUtil.getInt("io.netty.allocator.maxOrder", 11);
|
||||
int defaultMaxOrder = SystemPropertyUtil.getInt("io.net5.allocator.maxOrder", 11);
|
||||
Throwable maxOrderFallbackCause = null;
|
||||
try {
|
||||
validateAndCalculateChunkSize(DEFAULT_PAGE_SIZE, defaultMaxOrder);
|
||||
@ -97,62 +97,62 @@ public class PooledByteBufAllocator extends AbstractByteBufAllocator implements
|
||||
final int defaultChunkSize = DEFAULT_PAGE_SIZE << DEFAULT_MAX_ORDER;
|
||||
DEFAULT_NUM_HEAP_ARENA = Math.max(0,
|
||||
SystemPropertyUtil.getInt(
|
||||
"io.netty.allocator.numHeapArenas",
|
||||
"io.net5.allocator.numHeapArenas",
|
||||
(int) Math.min(
|
||||
defaultMinNumArena,
|
||||
runtime.maxMemory() / defaultChunkSize / 2 / 3)));
|
||||
DEFAULT_NUM_DIRECT_ARENA = Math.max(0,
|
||||
SystemPropertyUtil.getInt(
|
||||
"io.netty.allocator.numDirectArenas",
|
||||
"io.net5.allocator.numDirectArenas",
|
||||
(int) Math.min(
|
||||
defaultMinNumArena,
|
||||
PlatformDependent.maxDirectMemory() / defaultChunkSize / 2 / 3)));
|
||||
|
||||
// cache sizes
|
||||
DEFAULT_SMALL_CACHE_SIZE = SystemPropertyUtil.getInt("io.netty.allocator.smallCacheSize", 256);
|
||||
DEFAULT_NORMAL_CACHE_SIZE = SystemPropertyUtil.getInt("io.netty.allocator.normalCacheSize", 64);
|
||||
DEFAULT_SMALL_CACHE_SIZE = SystemPropertyUtil.getInt("io.net5.allocator.smallCacheSize", 256);
|
||||
DEFAULT_NORMAL_CACHE_SIZE = SystemPropertyUtil.getInt("io.net5.allocator.normalCacheSize", 64);
|
||||
|
||||
// 32 kb is the default maximum capacity of the cached buffer. Similar to what is explained in
|
||||
// 'Scalable memory allocation using jemalloc'
|
||||
DEFAULT_MAX_CACHED_BUFFER_CAPACITY = SystemPropertyUtil.getInt(
|
||||
"io.netty.allocator.maxCachedBufferCapacity", 32 * 1024);
|
||||
"io.net5.allocator.maxCachedBufferCapacity", 32 * 1024);
|
||||
|
||||
// the number of threshold of allocations when cached entries will be freed up if not frequently used
|
||||
DEFAULT_CACHE_TRIM_INTERVAL = SystemPropertyUtil.getInt(
|
||||
"io.netty.allocator.cacheTrimInterval", 8192);
|
||||
"io.net5.allocator.cacheTrimInterval", 8192);
|
||||
|
||||
DEFAULT_CACHE_TRIM_INTERVAL_MILLIS = SystemPropertyUtil.getLong(
|
||||
"io.netty.allocator.cacheTrimIntervalMillis", 0);
|
||||
"io.net5.allocator.cacheTrimIntervalMillis", 0);
|
||||
|
||||
DEFAULT_USE_CACHE_FOR_ALL_THREADS = SystemPropertyUtil.getBoolean(
|
||||
"io.netty.allocator.useCacheForAllThreads", false);
|
||||
"io.net5.allocator.useCacheForAllThreads", false);
|
||||
|
||||
// Use 1023 by default as we use an ArrayDeque as backing storage which will then allocate an internal array
|
||||
// of 1024 elements. Otherwise we would allocate 2048 and only use 1024 which is wasteful.
|
||||
DEFAULT_MAX_CACHED_BYTEBUFFERS_PER_CHUNK = SystemPropertyUtil.getInt(
|
||||
"io.netty.allocator.maxCachedByteBuffersPerChunk", 1023);
|
||||
"io.net5.allocator.maxCachedByteBuffersPerChunk", 1023);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("-Dio.netty.allocator.numHeapArenas: {}", DEFAULT_NUM_HEAP_ARENA);
|
||||
logger.debug("-Dio.netty.allocator.numDirectArenas: {}", DEFAULT_NUM_DIRECT_ARENA);
|
||||
logger.debug("-Dio.net5.allocator.numHeapArenas: {}", DEFAULT_NUM_HEAP_ARENA);
|
||||
logger.debug("-Dio.net5.allocator.numDirectArenas: {}", DEFAULT_NUM_DIRECT_ARENA);
|
||||
if (pageSizeFallbackCause == null) {
|
||||
logger.debug("-Dio.netty.allocator.pageSize: {}", DEFAULT_PAGE_SIZE);
|
||||
logger.debug("-Dio.net5.allocator.pageSize: {}", DEFAULT_PAGE_SIZE);
|
||||
} else {
|
||||
logger.debug("-Dio.netty.allocator.pageSize: {}", DEFAULT_PAGE_SIZE, pageSizeFallbackCause);
|
||||
logger.debug("-Dio.net5.allocator.pageSize: {}", DEFAULT_PAGE_SIZE, pageSizeFallbackCause);
|
||||
}
|
||||
if (maxOrderFallbackCause == null) {
|
||||
logger.debug("-Dio.netty.allocator.maxOrder: {}", DEFAULT_MAX_ORDER);
|
||||
logger.debug("-Dio.net5.allocator.maxOrder: {}", DEFAULT_MAX_ORDER);
|
||||
} else {
|
||||
logger.debug("-Dio.netty.allocator.maxOrder: {}", DEFAULT_MAX_ORDER, maxOrderFallbackCause);
|
||||
logger.debug("-Dio.net5.allocator.maxOrder: {}", DEFAULT_MAX_ORDER, maxOrderFallbackCause);
|
||||
}
|
||||
logger.debug("-Dio.netty.allocator.chunkSize: {}", DEFAULT_PAGE_SIZE << DEFAULT_MAX_ORDER);
|
||||
logger.debug("-Dio.netty.allocator.smallCacheSize: {}", DEFAULT_SMALL_CACHE_SIZE);
|
||||
logger.debug("-Dio.netty.allocator.normalCacheSize: {}", DEFAULT_NORMAL_CACHE_SIZE);
|
||||
logger.debug("-Dio.netty.allocator.maxCachedBufferCapacity: {}", DEFAULT_MAX_CACHED_BUFFER_CAPACITY);
|
||||
logger.debug("-Dio.netty.allocator.cacheTrimInterval: {}", DEFAULT_CACHE_TRIM_INTERVAL);
|
||||
logger.debug("-Dio.netty.allocator.cacheTrimIntervalMillis: {}", DEFAULT_CACHE_TRIM_INTERVAL_MILLIS);
|
||||
logger.debug("-Dio.netty.allocator.useCacheForAllThreads: {}", DEFAULT_USE_CACHE_FOR_ALL_THREADS);
|
||||
logger.debug("-Dio.netty.allocator.maxCachedByteBuffersPerChunk: {}",
|
||||
logger.debug("-Dio.net5.allocator.chunkSize: {}", DEFAULT_PAGE_SIZE << DEFAULT_MAX_ORDER);
|
||||
logger.debug("-Dio.net5.allocator.smallCacheSize: {}", DEFAULT_SMALL_CACHE_SIZE);
|
||||
logger.debug("-Dio.net5.allocator.normalCacheSize: {}", DEFAULT_NORMAL_CACHE_SIZE);
|
||||
logger.debug("-Dio.net5.allocator.maxCachedBufferCapacity: {}", DEFAULT_MAX_CACHED_BUFFER_CAPACITY);
|
||||
logger.debug("-Dio.net5.allocator.cacheTrimInterval: {}", DEFAULT_CACHE_TRIM_INTERVAL);
|
||||
logger.debug("-Dio.net5.allocator.cacheTrimIntervalMillis: {}", DEFAULT_CACHE_TRIM_INTERVAL_MILLIS);
|
||||
logger.debug("-Dio.net5.allocator.useCacheForAllThreads: {}", DEFAULT_USE_CACHE_FOR_ALL_THREADS);
|
||||
logger.debug("-Dio.net5.allocator.maxCachedByteBuffersPerChunk: {}",
|
||||
DEFAULT_MAX_CACHED_BYTEBUFFERS_PER_CHUNK);
|
||||
}
|
||||
}
|
||||
@ -384,42 +384,42 @@ public class PooledByteBufAllocator extends AbstractByteBufAllocator implements
|
||||
}
|
||||
|
||||
/**
|
||||
* Default number of heap arenas - System Property: io.netty.allocator.numHeapArenas - default 2 * cores
|
||||
* Default number of heap arenas - System Property: io.net5.allocator.numHeapArenas - default 2 * cores
|
||||
*/
|
||||
public static int defaultNumHeapArena() {
|
||||
return DEFAULT_NUM_HEAP_ARENA;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default number of direct arenas - System Property: io.netty.allocator.numDirectArenas - default 2 * cores
|
||||
* Default number of direct arenas - System Property: io.net5.allocator.numDirectArenas - default 2 * cores
|
||||
*/
|
||||
public static int defaultNumDirectArena() {
|
||||
return DEFAULT_NUM_DIRECT_ARENA;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default buffer page size - System Property: io.netty.allocator.pageSize - default 8192
|
||||
* Default buffer page size - System Property: io.net5.allocator.pageSize - default 8192
|
||||
*/
|
||||
public static int defaultPageSize() {
|
||||
return DEFAULT_PAGE_SIZE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default maximum order - System Property: io.netty.allocator.maxOrder - default 11
|
||||
* Default maximum order - System Property: io.net5.allocator.maxOrder - default 11
|
||||
*/
|
||||
public static int defaultMaxOrder() {
|
||||
return DEFAULT_MAX_ORDER;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default thread caching behavior - System Property: io.netty.allocator.useCacheForAllThreads - default true
|
||||
* Default thread caching behavior - System Property: io.net5.allocator.useCacheForAllThreads - default true
|
||||
*/
|
||||
public static boolean defaultUseCacheForAllThreads() {
|
||||
return DEFAULT_USE_CACHE_FOR_ALL_THREADS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default prefer direct - System Property: io.netty.noPreferDirect - default false
|
||||
* Default prefer direct - System Property: io.net5.noPreferDirect - default false
|
||||
*/
|
||||
public static boolean defaultPreferDirect() {
|
||||
return PlatformDependent.directBufferPreferred();
|
||||
@ -436,14 +436,14 @@ public class PooledByteBufAllocator extends AbstractByteBufAllocator implements
|
||||
}
|
||||
|
||||
/**
|
||||
* Default small cache size - System Property: io.netty.allocator.smallCacheSize - default 256
|
||||
* Default small cache size - System Property: io.net5.allocator.smallCacheSize - default 256
|
||||
*/
|
||||
public static int defaultSmallCacheSize() {
|
||||
return DEFAULT_SMALL_CACHE_SIZE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default normal cache size - System Property: io.netty.allocator.normalCacheSize - default 64
|
||||
* Default normal cache size - System Property: io.net5.allocator.normalCacheSize - default 64
|
||||
*/
|
||||
public static int defaultNormalCacheSize() {
|
||||
return DEFAULT_NORMAL_CACHE_SIZE;
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -14,10 +14,10 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.ObjectPool;
|
||||
import io.netty.util.internal.ObjectPool.Handle;
|
||||
import io.net5.util.internal.ObjectPool;
|
||||
import io.net5.util.internal.ObjectPool.Handle;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -14,11 +14,11 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.internal.ObjectPool;
|
||||
import io.netty.util.internal.ObjectPool.Handle;
|
||||
import io.net5.util.ByteProcessor;
|
||||
import io.net5.util.internal.ObjectPool;
|
||||
import io.net5.util.internal.ObjectPool.Handle;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -12,11 +12,11 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.ObjectPool;
|
||||
import io.netty.util.internal.ObjectPool.Handle;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.ObjectPool;
|
||||
import io.net5.util.internal.ObjectPool.Handle;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -14,11 +14,11 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.internal.ObjectPool;
|
||||
import io.netty.util.internal.ObjectPool.Handle;
|
||||
import io.net5.util.ByteProcessor;
|
||||
import io.net5.util.internal.ObjectPool;
|
||||
import io.net5.util.internal.ObjectPool.Handle;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -28,7 +28,7 @@ import java.nio.channels.FileChannel;
|
||||
import java.nio.channels.GatheringByteChannel;
|
||||
import java.nio.channels.ScatteringByteChannel;
|
||||
|
||||
import static io.netty.buffer.AbstractUnpooledSlicedByteBuf.checkSliceOutOfBounds;
|
||||
import static io.net5.buffer.AbstractUnpooledSlicedByteBuf.checkSliceOutOfBounds;
|
||||
|
||||
final class PooledSlicedByteBuf extends AbstractPooledDerivedByteBuf {
|
||||
|
@ -14,11 +14,11 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.ObjectPool;
|
||||
import io.netty.util.internal.ObjectPool.Handle;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.ObjectPool;
|
||||
import io.net5.util.internal.ObjectPool.Handle;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,11 +13,11 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.ObjectPool;
|
||||
import io.netty.util.internal.ObjectPool.Handle;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.ObjectPool;
|
||||
import io.net5.util.internal.ObjectPool.Handle;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
final class PooledUnsafeHeapByteBuf extends PooledHeapByteBuf {
|
||||
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.net5.util.ByteProcessor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,14 +13,14 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
|
||||
/**
|
@ -14,12 +14,12 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import io.netty.util.ResourceLeakDetector;
|
||||
import io.netty.util.ResourceLeakTracker;
|
||||
import io.net5.util.ResourceLeakDetector;
|
||||
import io.net5.util.ResourceLeakTracker;
|
||||
|
||||
import java.nio.ByteOrder;
|
||||
|
@ -13,11 +13,11 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import io.netty.util.ResourceLeakTracker;
|
||||
import io.net5.util.ResourceLeakTracker;
|
||||
|
||||
import java.nio.ByteOrder;
|
||||
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static io.netty.buffer.PoolThreadCache.*;
|
||||
import static io.net5.buffer.PoolThreadCache.*;
|
||||
|
||||
/**
|
||||
* SizeClasses requires {@code pageShifts} to be defined prior to inclusion,
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
/**
|
||||
* Expose metrics for an SizeClasses.
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
/**
|
||||
* A derived buffer which exposes its parent's sub-region only. It is
|
@ -13,11 +13,11 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.net5.util.ByteProcessor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,13 +13,13 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import io.netty.buffer.CompositeByteBuf.ByteWrapper;
|
||||
import io.netty.util.CharsetUtil;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.buffer.CompositeByteBuf.ByteWrapper;
|
||||
import io.net5.util.CharsetUtil;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
@ -36,7 +36,7 @@ import java.util.Arrays;
|
||||
* This classes is intended to be used with Java 5 static import statement:
|
||||
*
|
||||
* <pre>
|
||||
* import static io.netty.buffer.{@link Unpooled}.*;
|
||||
* import static io.net5.buffer.{@link Unpooled}.*;
|
||||
*
|
||||
* {@link ByteBuf} heapBuffer = buffer(128);
|
||||
* {@link ByteBuf} directBuffer = directBuffer(256);
|
@ -13,10 +13,10 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.concurrent.atomic.LongAdder;
|
@ -13,12 +13,12 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static io.net5.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
/**
|
||||
* {@link DuplicatedByteBuf} implementation that can do optimizations because it knows the duplicated buffer
|
@ -13,12 +13,12 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import io.netty.util.internal.EmptyArrays;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.EmptyArrays;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
/**
|
||||
* A special {@link AbstractUnpooledSlicedByteBuf} that can make optimizations because it knows the sliced buffer is of
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
/**
|
||||
* Big endian Java heap buffer implementation. It is recommended to use
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -24,8 +24,8 @@ import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.ReadOnlyBufferException;
|
||||
|
||||
import static io.netty.util.internal.MathUtil.isOutOfBounds;
|
||||
import static io.netty.util.internal.PlatformDependent.BIG_ENDIAN_NATIVE_ORDER;
|
||||
import static io.net5.util.internal.MathUtil.isOutOfBounds;
|
||||
import static io.net5.util.internal.PlatformDependent.BIG_ENDIAN_NATIVE_ORDER;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
/**
|
@ -14,9 +14,9 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
/**
|
||||
* Special {@link SwappedByteBuf} for {@link ByteBuf}s that are backed by a {@code memoryAddress}.
|
@ -14,9 +14,9 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
/**
|
||||
* Special {@link SwappedByteBuf} for {@link ByteBuf}s that use unsafe to access the byte array.
|
@ -14,12 +14,12 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.net5.util.ByteProcessor;
|
||||
import io.net5.util.internal.StringUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.net5.util.ByteProcessor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer;
|
||||
package io.net5.buffer;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.net5.util.internal.PlatformDependent;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.api;
|
||||
package io.net5.buffer.api;
|
||||
|
||||
/**
|
||||
* An object used by {@linkplain BufferAllocator buffer allocators} to communicate desirable properties of an
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.api;
|
||||
package io.net5.buffer.api;
|
||||
|
||||
import io.netty.util.internal.UnstableApi;
|
||||
import io.net5.util.internal.UnstableApi;
|
||||
|
||||
/**
|
||||
* Methods for accessing and controlling the internals of an allocator.
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.api;
|
||||
package io.net5.buffer.api;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.api;
|
||||
package io.net5.buffer.api;
|
||||
|
||||
/**
|
||||
* This interface is just the primitive data accessor methods that {@link Buffer} exposes.
|
@ -13,9 +13,9 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.api;
|
||||
package io.net5.buffer.api;
|
||||
|
||||
import io.netty.buffer.api.pool.PooledBufferAllocator;
|
||||
import io.net5.buffer.api.pool.PooledBufferAllocator;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.api;
|
||||
package io.net5.buffer.api;
|
||||
|
||||
/**
|
||||
* An exception thrown when an operation is attempted on a {@link Buffer} when it has been closed.
|
@ -13,10 +13,10 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.api;
|
||||
package io.net5.buffer.api;
|
||||
|
||||
import io.netty.buffer.api.internal.ResourceSupport;
|
||||
import io.netty.buffer.api.internal.Statics;
|
||||
import io.net5.buffer.api.internal.ResourceSupport;
|
||||
import io.net5.buffer.api.internal.Statics;
|
||||
|
||||
import java.lang.invoke.VarHandle;
|
||||
import java.util.Objects;
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.api;
|
||||
package io.net5.buffer.api;
|
||||
|
||||
/**
|
||||
* An exception thrown when an operation is attempted on a {@linkplain Buffer#readOnly() read-only} {@link Buffer}.
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.api;
|
||||
package io.net5.buffer.api;
|
||||
|
||||
import java.lang.invoke.VarHandle;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.api;
|
||||
package io.net5.buffer.api;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
@ -12,9 +12,9 @@
|
||||
* or implied. See the License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package io.netty.buffer.api;
|
||||
package io.net5.buffer.api;
|
||||
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.net5.util.ByteProcessor;
|
||||
|
||||
/**
|
||||
* The ByteCursor scans through a sequence of bytes.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user