2013-12-04 11:03:32 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2013 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:
|
|
|
|
*
|
2020-10-23 14:44:18 +02:00
|
|
|
* https://www.apache.org/licenses/LICENSE-2.0
|
2013-12-04 11:03:32 +01:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2021-09-17 16:28:14 +02:00
|
|
|
package io.net5.buffer;
|
2013-12-04 11:03:32 +01:00
|
|
|
|
2021-09-17 16:28:14 +02:00
|
|
|
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;
|
2013-12-04 11:03:32 +01:00
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.io.OutputStream;
|
|
|
|
import java.nio.ByteBuffer;
|
2013-12-06 13:32:33 +01:00
|
|
|
import java.nio.ByteOrder;
|
2016-02-15 05:43:22 +01:00
|
|
|
import java.nio.channels.FileChannel;
|
2013-12-04 11:03:32 +01:00
|
|
|
import java.nio.channels.GatheringByteChannel;
|
|
|
|
import java.nio.channels.ScatteringByteChannel;
|
|
|
|
import java.nio.charset.Charset;
|
|
|
|
|
2016-12-01 08:36:16 +01:00
|
|
|
final class AdvancedLeakAwareByteBuf extends SimpleLeakAwareByteBuf {
|
2013-12-04 11:03:32 +01:00
|
|
|
|
2021-08-16 12:19:17 +02:00
|
|
|
// If set to true we will only record stacktraces for touch(...), release(...) and retain(...) calls.
|
2021-09-17 16:28:14 +02:00
|
|
|
private static final String PROP_ACQUIRE_AND_RELEASE_ONLY = "io.net5.leakDetection.acquireAndReleaseOnly";
|
2015-08-29 00:05:52 +02:00
|
|
|
private static final boolean ACQUIRE_AND_RELEASE_ONLY;
|
|
|
|
|
2015-09-01 00:06:35 +02:00
|
|
|
private static final InternalLogger logger = InternalLoggerFactory.getInstance(AdvancedLeakAwareByteBuf.class);
|
|
|
|
|
2015-08-29 00:05:52 +02:00
|
|
|
static {
|
|
|
|
ACQUIRE_AND_RELEASE_ONLY = SystemPropertyUtil.getBoolean(PROP_ACQUIRE_AND_RELEASE_ONLY, false);
|
2015-09-01 00:06:35 +02:00
|
|
|
|
|
|
|
if (logger.isDebugEnabled()) {
|
|
|
|
logger.debug("-D{}: {}", PROP_ACQUIRE_AND_RELEASE_ONLY, ACQUIRE_AND_RELEASE_ONLY);
|
|
|
|
}
|
Motivation: Resource Leak Detector (RLD) tries to helpfully indicate where an object was last accessed and report the accesses in the case the object was not cleaned up. It handles lightly used objects well, but drops all but the last few accesses.
Configuring this is tough because there is split between highly shared (and accessed) objects and lightly accessed objects.
Modification:
There are a number of changes here. In relative order of importance:
API / Functionality changes:
* Max records and max sample records are gone. Only "target" records, the number of records tries to retain is exposed.
* Records are sampled based on the number of already stored records. The likelihood of recording a new sample is `2^(-n)`, where `n` is the number of currently stored elements.
* Records are stored in a concurrent stack structure rather than a list. This avoids a head and tail. Since the stack is only read once, there is no need to maintain head and tail pointers
* The properties of this imply that the very first and very last access are always recorded. When deciding to sample, the top element is replaced rather than pushed.
* Samples that happen between the first and last accesses now have a chance of being recorded. Previously only the final few were kept.
* Sampling is no longer deterministic. Previously, a deterministic access pattern meant that you could conceivably always miss some access points.
* Sampling has a linear ramp for low values and and exponentially backs off roughly equal to 2^n. This means that for 1,000,000 accesses, about 20 will actually be kept. I have an elegant proof for this which is too large to fit in this commit message.
Code changes:
* All locks are gone. Because sampling rarely needs to do a write, there is almost 0 contention. The dropped records counter is slightly contentious, but this could be removed or changed to a LongAdder. This was not done because of memory concerns.
* Stack trace exclusion is done outside of RLD. Classes can opt to remove some of their methods.
* Stack trace exclusion is faster, since it uses String.equals, often getting a pointer compare due to interning. Previously it used contains()
* Leak printing is outputted fairly differently. I tried to preserve as much of the original formatting as possible, but some things didn't make sense to keep.
Result:
More useful leak reporting.
Faster:
```
Before:
Benchmark (recordTimes) Mode Cnt Score Error Units
ResourceLeakDetectorRecordBenchmark.record 8 thrpt 20 136293.404 ± 7669.454 ops/s
ResourceLeakDetectorRecordBenchmark.record 16 thrpt 20 72805.720 ± 3710.864 ops/s
ResourceLeakDetectorRecordBenchmark.recordWithHint 8 thrpt 20 139131.215 ± 4882.751 ops/s
ResourceLeakDetectorRecordBenchmark.recordWithHint 16 thrpt 20 74146.313 ± 4999.246 ops/s
After:
Benchmark (recordTimes) Mode Cnt Score Error Units
ResourceLeakDetectorRecordBenchmark.record 8 thrpt 20 155281.969 ± 5301.399 ops/s
ResourceLeakDetectorRecordBenchmark.record 16 thrpt 20 77866.239 ± 3821.054 ops/s
ResourceLeakDetectorRecordBenchmark.recordWithHint 8 thrpt 20 153360.036 ± 8611.353 ops/s
ResourceLeakDetectorRecordBenchmark.recordWithHint 16 thrpt 20 78670.804 ± 2399.149 ops/s
```
2017-09-19 02:46:39 +02:00
|
|
|
|
|
|
|
ResourceLeakDetector.addExclusions(
|
|
|
|
AdvancedLeakAwareByteBuf.class, "touch", "recordLeakNonRefCountingOperation");
|
2015-08-29 00:05:52 +02:00
|
|
|
}
|
|
|
|
|
2016-12-01 08:36:16 +01:00
|
|
|
AdvancedLeakAwareByteBuf(ByteBuf buf, ResourceLeakTracker<ByteBuf> leak) {
|
|
|
|
super(buf, leak);
|
|
|
|
}
|
2013-12-04 11:03:32 +01:00
|
|
|
|
2016-12-01 08:36:16 +01:00
|
|
|
AdvancedLeakAwareByteBuf(ByteBuf wrapped, ByteBuf trackedByteBuf, ResourceLeakTracker<ByteBuf> leak) {
|
|
|
|
super(wrapped, trackedByteBuf, leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
}
|
|
|
|
|
2016-12-01 08:36:16 +01:00
|
|
|
static void recordLeakNonRefCountingOperation(ResourceLeakTracker<ByteBuf> leak) {
|
2015-08-29 00:05:52 +02:00
|
|
|
if (!ACQUIRE_AND_RELEASE_ONLY) {
|
|
|
|
leak.record();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-06 13:32:33 +01:00
|
|
|
@Override
|
|
|
|
public ByteBuf order(ByteOrder endianness) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-12-01 08:36:16 +01:00
|
|
|
return super.order(endianness);
|
2013-12-06 13:32:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf slice() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-12-01 08:36:16 +01:00
|
|
|
return super.slice();
|
2013-12-06 13:32:33 +01:00
|
|
|
}
|
|
|
|
|
2016-04-14 10:31:48 +02:00
|
|
|
@Override
|
2016-12-01 08:36:16 +01:00
|
|
|
public ByteBuf slice(int index, int length) {
|
2016-04-14 10:31:48 +02:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-12-01 08:36:16 +01:00
|
|
|
return super.slice(index, length);
|
2016-04-14 10:31:48 +02:00
|
|
|
}
|
|
|
|
|
2013-12-06 13:32:33 +01:00
|
|
|
@Override
|
2016-12-01 08:36:16 +01:00
|
|
|
public ByteBuf retainedSlice() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-12-01 08:36:16 +01:00
|
|
|
return super.retainedSlice();
|
2013-12-06 13:32:33 +01:00
|
|
|
}
|
|
|
|
|
2016-04-14 10:31:48 +02:00
|
|
|
@Override
|
|
|
|
public ByteBuf retainedSlice(int index, int length) {
|
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-12-01 08:36:16 +01:00
|
|
|
return super.retainedSlice(index, length);
|
2016-04-14 10:31:48 +02:00
|
|
|
}
|
|
|
|
|
2013-12-06 13:32:33 +01:00
|
|
|
@Override
|
2016-12-01 08:36:16 +01:00
|
|
|
public ByteBuf retainedDuplicate() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-12-01 08:36:16 +01:00
|
|
|
return super.retainedDuplicate();
|
2013-12-06 13:32:33 +01:00
|
|
|
}
|
|
|
|
|
2016-04-14 10:31:48 +02:00
|
|
|
@Override
|
2016-12-01 08:36:16 +01:00
|
|
|
public ByteBuf readRetainedSlice(int length) {
|
2016-04-14 10:31:48 +02:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-12-01 08:36:16 +01:00
|
|
|
return super.readRetainedSlice(length);
|
2016-04-14 10:31:48 +02:00
|
|
|
}
|
|
|
|
|
2013-12-06 13:32:33 +01:00
|
|
|
@Override
|
2016-12-01 08:36:16 +01:00
|
|
|
public ByteBuf duplicate() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-12-01 08:36:16 +01:00
|
|
|
return super.duplicate();
|
2013-12-06 13:32:33 +01:00
|
|
|
}
|
|
|
|
|
2016-04-14 10:31:48 +02:00
|
|
|
@Override
|
2016-12-01 08:36:16 +01:00
|
|
|
public ByteBuf readSlice(int length) {
|
2016-04-14 10:31:48 +02:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-12-01 08:36:16 +01:00
|
|
|
return super.readSlice(length);
|
2016-04-14 10:31:48 +02:00
|
|
|
}
|
|
|
|
|
2013-12-04 11:03:32 +01:00
|
|
|
@Override
|
|
|
|
public ByteBuf discardReadBytes() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.discardReadBytes();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf discardSomeReadBytes() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.discardSomeReadBytes();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf ensureWritable(int minWritableBytes) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.ensureWritable(minWritableBytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int ensureWritable(int minWritableBytes, boolean force) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.ensureWritable(minWritableBytes, force);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean getBoolean(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getBoolean(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public byte getByte(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getByte(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public short getUnsignedByte(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getUnsignedByte(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public short getShort(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getShort(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getUnsignedShort(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getUnsignedShort(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getMedium(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getMedium(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getUnsignedMedium(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getUnsignedMedium(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getInt(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getInt(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public long getUnsignedInt(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getUnsignedInt(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public long getLong(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getLong(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public char getChar(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getChar(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public float getFloat(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getFloat(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public double getDouble(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getDouble(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf getBytes(int index, ByteBuf dst) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getBytes(index, dst);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf getBytes(int index, ByteBuf dst, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getBytes(index, dst, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getBytes(index, dst, dstIndex, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf getBytes(int index, byte[] dst) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getBytes(index, dst);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getBytes(index, dst, dstIndex, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf getBytes(int index, ByteBuffer dst) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getBytes(index, dst);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf getBytes(int index, OutputStream out, int length) throws IOException {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getBytes(index, out, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getBytes(int index, GatheringByteChannel out, int length) throws IOException {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.getBytes(index, out, length);
|
|
|
|
}
|
|
|
|
|
2016-04-11 11:47:35 +02:00
|
|
|
@Override
|
|
|
|
public CharSequence getCharSequence(int index, int length, Charset charset) {
|
|
|
|
recordLeakNonRefCountingOperation(leak);
|
|
|
|
return super.getCharSequence(index, length, charset);
|
|
|
|
}
|
|
|
|
|
2013-12-04 11:03:32 +01:00
|
|
|
@Override
|
|
|
|
public ByteBuf setBoolean(int index, boolean value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setBoolean(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setByte(int index, int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setByte(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setShort(int index, int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setShort(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setMedium(int index, int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setMedium(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setInt(int index, int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setInt(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setLong(int index, long value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setLong(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setChar(int index, int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setChar(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setFloat(int index, float value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setFloat(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setDouble(int index, double value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setDouble(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setBytes(int index, ByteBuf src) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setBytes(index, src);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setBytes(int index, ByteBuf src, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setBytes(index, src, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setBytes(index, src, srcIndex, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setBytes(int index, byte[] src) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setBytes(index, src);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setBytes(int index, byte[] src, int srcIndex, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setBytes(index, src, srcIndex, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setBytes(int index, ByteBuffer src) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setBytes(index, src);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int setBytes(int index, InputStream in, int length) throws IOException {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setBytes(index, in, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int setBytes(int index, ScatteringByteChannel in, int length) throws IOException {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setBytes(index, in, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setZero(int index, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.setZero(index, length);
|
|
|
|
}
|
|
|
|
|
2016-04-11 11:47:35 +02:00
|
|
|
@Override
|
|
|
|
public int setCharSequence(int index, CharSequence sequence, Charset charset) {
|
|
|
|
recordLeakNonRefCountingOperation(leak);
|
|
|
|
return super.setCharSequence(index, sequence, charset);
|
|
|
|
}
|
|
|
|
|
2013-12-04 11:03:32 +01:00
|
|
|
@Override
|
|
|
|
public boolean readBoolean() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readBoolean();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public byte readByte() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readByte();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public short readUnsignedByte() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readUnsignedByte();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public short readShort() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readShort();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int readUnsignedShort() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readUnsignedShort();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int readMedium() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readMedium();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int readUnsignedMedium() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readUnsignedMedium();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int readInt() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public long readUnsignedInt() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readUnsignedInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public long readLong() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readLong();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public char readChar() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readChar();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public float readFloat() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readFloat();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public double readDouble() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readDouble();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf readBytes(int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readBytes(length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf readBytes(ByteBuf dst) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readBytes(dst);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf readBytes(ByteBuf dst, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readBytes(dst, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf readBytes(ByteBuf dst, int dstIndex, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readBytes(dst, dstIndex, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf readBytes(byte[] dst) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readBytes(dst);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf readBytes(byte[] dst, int dstIndex, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readBytes(dst, dstIndex, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf readBytes(ByteBuffer dst) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readBytes(dst);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf readBytes(OutputStream out, int length) throws IOException {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readBytes(out, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int readBytes(GatheringByteChannel out, int length) throws IOException {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.readBytes(out, length);
|
|
|
|
}
|
|
|
|
|
2016-04-11 11:47:35 +02:00
|
|
|
@Override
|
|
|
|
public CharSequence readCharSequence(int length, Charset charset) {
|
|
|
|
recordLeakNonRefCountingOperation(leak);
|
|
|
|
return super.readCharSequence(length, charset);
|
|
|
|
}
|
|
|
|
|
2013-12-04 11:03:32 +01:00
|
|
|
@Override
|
|
|
|
public ByteBuf skipBytes(int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.skipBytes(length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeBoolean(boolean value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeBoolean(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeByte(int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeByte(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeShort(int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeShort(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeMedium(int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeMedium(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeInt(int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeInt(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeLong(long value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeLong(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeChar(int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeChar(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeFloat(float value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeFloat(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeDouble(double value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeDouble(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeBytes(ByteBuf src) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeBytes(src);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeBytes(ByteBuf src, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeBytes(src, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeBytes(ByteBuf src, int srcIndex, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeBytes(src, srcIndex, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeBytes(byte[] src) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeBytes(src);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeBytes(byte[] src, int srcIndex, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeBytes(src, srcIndex, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeBytes(ByteBuffer src) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeBytes(src);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int writeBytes(InputStream in, int length) throws IOException {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeBytes(in, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int writeBytes(ScatteringByteChannel in, int length) throws IOException {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeBytes(in, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeZero(int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.writeZero(length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int indexOf(int fromIndex, int toIndex, byte value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.indexOf(fromIndex, toIndex, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int bytesBefore(byte value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.bytesBefore(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int bytesBefore(int length, byte value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.bytesBefore(length, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int bytesBefore(int index, int length, byte value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.bytesBefore(index, length, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-04-01 01:23:52 +02:00
|
|
|
public int forEachByte(ByteProcessor processor) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.forEachByte(processor);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-04-01 01:23:52 +02:00
|
|
|
public int forEachByte(int index, int length, ByteProcessor processor) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.forEachByte(index, length, processor);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-04-01 01:23:52 +02:00
|
|
|
public int forEachByteDesc(ByteProcessor processor) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.forEachByteDesc(processor);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-04-01 01:23:52 +02:00
|
|
|
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.forEachByteDesc(index, length, processor);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf copy() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.copy();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf copy(int index, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.copy(index, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int nioBufferCount() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.nioBufferCount();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuffer nioBuffer() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.nioBuffer();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuffer nioBuffer(int index, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.nioBuffer(index, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuffer[] nioBuffers() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.nioBuffers();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuffer[] nioBuffers(int index, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.nioBuffers(index, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuffer internalNioBuffer(int index, int length) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.internalNioBuffer(index, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString(Charset charset) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.toString(charset);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString(int index, int length, Charset charset) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-04 11:03:32 +01:00
|
|
|
return super.toString(index, length, charset);
|
|
|
|
}
|
|
|
|
|
2013-12-06 05:44:59 +01:00
|
|
|
@Override
|
|
|
|
public ByteBuf capacity(int newCapacity) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2013-12-06 05:44:59 +01:00
|
|
|
return super.capacity(newCapacity);
|
|
|
|
}
|
|
|
|
|
2016-01-12 15:19:30 +01:00
|
|
|
@Override
|
|
|
|
public short getShortLE(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.getShortLE(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getUnsignedShortLE(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.getUnsignedShortLE(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getMediumLE(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.getMediumLE(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getUnsignedMediumLE(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.getUnsignedMediumLE(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getIntLE(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.getIntLE(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public long getUnsignedIntLE(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.getUnsignedIntLE(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public long getLongLE(int index) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.getLongLE(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setShortLE(int index, int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.setShortLE(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setIntLE(int index, int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.setIntLE(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setMediumLE(int index, int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.setMediumLE(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf setLongLE(int index, long value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.setLongLE(index, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public short readShortLE() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.readShortLE();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int readUnsignedShortLE() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.readUnsignedShortLE();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int readMediumLE() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.readMediumLE();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int readUnsignedMediumLE() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.readUnsignedMediumLE();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int readIntLE() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.readIntLE();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public long readUnsignedIntLE() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.readUnsignedIntLE();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public long readLongLE() {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.readLongLE();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeShortLE(int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.writeShortLE(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeMediumLE(int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.writeMediumLE(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeIntLE(int value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.writeIntLE(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf writeLongLE(long value) {
|
2016-01-12 15:06:30 +01:00
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-01-12 15:19:30 +01:00
|
|
|
return super.writeLongLE(value);
|
|
|
|
}
|
|
|
|
|
2016-04-11 11:47:35 +02:00
|
|
|
@Override
|
|
|
|
public int writeCharSequence(CharSequence sequence, Charset charset) {
|
|
|
|
recordLeakNonRefCountingOperation(leak);
|
|
|
|
return super.writeCharSequence(sequence, charset);
|
|
|
|
}
|
|
|
|
|
2016-02-15 05:43:22 +01:00
|
|
|
@Override
|
|
|
|
public int getBytes(int index, FileChannel out, long position, int length) throws IOException {
|
|
|
|
recordLeakNonRefCountingOperation(leak);
|
|
|
|
return super.getBytes(index, out, position, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int setBytes(int index, FileChannel in, long position, int length) throws IOException {
|
|
|
|
recordLeakNonRefCountingOperation(leak);
|
|
|
|
return super.setBytes(index, in, position, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int readBytes(FileChannel out, long position, int length) throws IOException {
|
|
|
|
recordLeakNonRefCountingOperation(leak);
|
|
|
|
return super.readBytes(out, position, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int writeBytes(FileChannel in, long position, int length) throws IOException {
|
|
|
|
recordLeakNonRefCountingOperation(leak);
|
|
|
|
return super.writeBytes(in, position, length);
|
|
|
|
}
|
|
|
|
|
2016-04-13 15:25:15 +02:00
|
|
|
@Override
|
|
|
|
public ByteBuf asReadOnly() {
|
|
|
|
recordLeakNonRefCountingOperation(leak);
|
2016-12-01 08:36:16 +01:00
|
|
|
return super.asReadOnly();
|
2016-04-13 15:25:15 +02:00
|
|
|
}
|
|
|
|
|
2013-12-06 05:44:59 +01:00
|
|
|
@Override
|
|
|
|
public ByteBuf retain() {
|
|
|
|
leak.record();
|
|
|
|
return super.retain();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ByteBuf retain(int increment) {
|
|
|
|
leak.record();
|
|
|
|
return super.retain(increment);
|
|
|
|
}
|
|
|
|
|
2017-07-16 09:38:16 +02:00
|
|
|
@Override
|
|
|
|
public boolean release() {
|
|
|
|
leak.record();
|
|
|
|
return super.release();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean release(int decrement) {
|
|
|
|
leak.record();
|
|
|
|
return super.release(decrement);
|
|
|
|
}
|
|
|
|
|
2014-01-28 12:00:28 +01:00
|
|
|
@Override
|
|
|
|
public ByteBuf touch() {
|
|
|
|
leak.record();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2014-01-29 03:44:59 +01:00
|
|
|
@Override
|
|
|
|
public ByteBuf touch(Object hint) {
|
|
|
|
leak.record(hint);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-12-04 11:03:32 +01:00
|
|
|
@Override
|
2016-12-01 08:36:16 +01:00
|
|
|
protected AdvancedLeakAwareByteBuf newLeakAwareByteBuf(
|
|
|
|
ByteBuf buf, ByteBuf trackedByteBuf, ResourceLeakTracker<ByteBuf> leakTracker) {
|
|
|
|
return new AdvancedLeakAwareByteBuf(buf, trackedByteBuf, leakTracker);
|
2013-12-04 11:03:32 +01:00
|
|
|
}
|
|
|
|
}
|