Fix compilation and all checkstyle complaints
This commit is contained in:
parent
09f9b5a158
commit
f6e5d26ce8
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import jdk.incubator.foreign.MemorySegment;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import jdk.incubator.foreign.MemoryAccess;
|
||||
@ -5,8 +20,8 @@ import jdk.incubator.foreign.MemorySegment;
|
||||
|
||||
import static io.netty.buffer.b2.Statics.*;
|
||||
|
||||
public class BBuf extends RcSupport<Buf,BBuf> implements Buf {
|
||||
static final Drop<BBuf> NO_DROP = buf -> {};
|
||||
class BBuf extends RcSupport<Buf, BBuf> implements Buf {
|
||||
static final Drop<BBuf> NO_DROP = buf -> { };
|
||||
static final Drop<BBuf> SEGMENT_CLOSE = buf -> buf.segment.close();
|
||||
static final Drop<BBuf> SEGMENT_CLOSE_NATIVE = buf -> {
|
||||
buf.segment.close();
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import java.lang.invoke.VarHandle;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
@ -54,7 +69,7 @@ public abstract class RcSupport<I extends Rc<I>, T extends RcSupport<I, T>> impl
|
||||
*/
|
||||
@Override
|
||||
public void sendTo(Consumer<Send<I>> consumer) throws InterruptedException {
|
||||
var send = new RendezvousSend<I,T>(impl(), drop);
|
||||
var send = new RendezvousSend<I, T>(impl(), drop);
|
||||
consumer.accept(send);
|
||||
send.finish();
|
||||
acquires = -2; // close without dropping (also ignore future double-free attempts)
|
||||
@ -73,7 +88,7 @@ public abstract class RcSupport<I extends Rc<I>, T extends RcSupport<I, T>> impl
|
||||
@Override
|
||||
public Send<I> send() {
|
||||
acquires = -2; // close without dropping (also ignore future double-free attempts)
|
||||
return new TransferSend<I,T>(prepareSend(), drop);
|
||||
return new TransferSend<I, T>(prepareSend(), drop);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import java.lang.invoke.VarHandle;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import jdk.incubator.foreign.MemorySegment;
|
||||
@ -10,7 +25,8 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import static java.lang.invoke.MethodHandles.*;
|
||||
|
||||
abstract class SizeClassedMemoryPool implements Allocator, Drop<BBuf> {
|
||||
private static final VarHandle CLOSE = Statics.findVarHandle(lookup(), SizeClassedMemoryPool.class, "closed", boolean.class);
|
||||
private static final VarHandle CLOSE = Statics.findVarHandle(
|
||||
lookup(), SizeClassedMemoryPool.class, "closed", boolean.class);
|
||||
private final ConcurrentHashMap<Long, ConcurrentLinkedQueue<Send<Buf>>> pool;
|
||||
private final Drop<BBuf> disposer;
|
||||
@SuppressWarnings("unused")
|
||||
@ -47,7 +63,7 @@ abstract class SizeClassedMemoryPool implements Allocator, Drop<BBuf> {
|
||||
public void close() {
|
||||
if (CLOSE.compareAndSet(this, false, true)) {
|
||||
var capturedExceptions = new ArrayList<Exception>(4);
|
||||
pool.forEach((k,v) -> {
|
||||
pool.forEach((k, v) -> {
|
||||
Send<Buf> send;
|
||||
while ((send = v.poll()) != null) {
|
||||
try {
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import java.lang.invoke.VarHandle;
|
||||
|
20
buffer/src/main/java/io/netty/buffer/b2/package-info.java
Normal file
20
buffer/src/main/java/io/netty/buffer/b2/package-info.java
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Experimental {@code Buf} implementation, based on MemorySegment, as a potential alternative to {@code ByteBuf}.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import org.junit.After;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import org.junit.Test;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import org.junit.Test;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
public class PooledDirectBBufTest extends DirectBBufTest {
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
import org.junit.Ignore;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package io.netty.buffer.b2;
|
||||
|
||||
public class PooledHeapBBufTest extends HeapBBufTest {
|
||||
|
@ -16,7 +16,7 @@
|
||||
package io.netty.buffer;
|
||||
|
||||
import io.netty.buffer.b2.Allocator;
|
||||
import io.netty.buffer.b2.BBuf;
|
||||
import io.netty.buffer.b2.Buf;
|
||||
import io.netty.microbench.util.AbstractMicrobenchmark;
|
||||
import org.openjdk.jmh.annotations.Benchmark;
|
||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||
@ -40,36 +40,36 @@ public class BBufAccessBenchmark extends AbstractMicrobenchmark {
|
||||
public enum BBufType {
|
||||
UNSAFE {
|
||||
@Override
|
||||
BBuf newBuffer() {
|
||||
Buf newBuffer() {
|
||||
return Allocator.direct().allocate(64);
|
||||
}
|
||||
},
|
||||
// UNSAFE_SLICE {
|
||||
// @Override
|
||||
// BBuf newBuffer() {
|
||||
// Buf newBuffer() {
|
||||
// return UNSAFE.newBuffer().slice(16, 48);
|
||||
// }
|
||||
// },
|
||||
HEAP {
|
||||
@Override
|
||||
BBuf newBuffer() {
|
||||
Buf newBuffer() {
|
||||
return Allocator.heap().allocate(64);
|
||||
}
|
||||
},
|
||||
// COMPOSITE {
|
||||
// @Override
|
||||
// BBuf newBuffer() {
|
||||
// Buf newBuffer() {
|
||||
// return Unpooled.wrappedBuffer(UNSAFE.newBuffer(), HEAP.newBuffer());
|
||||
// }
|
||||
// },
|
||||
// NIO {
|
||||
// @Override
|
||||
// BBuf newBuffer() {
|
||||
// Buf newBuffer() {
|
||||
// return new NioFacade(BBuffer.allocateDirect(64));
|
||||
// }
|
||||
// }
|
||||
;
|
||||
abstract BBuf newBuffer();
|
||||
abstract Buf newBuffer();
|
||||
}
|
||||
|
||||
@Param
|
||||
@ -83,7 +83,7 @@ public class BBufAccessBenchmark extends AbstractMicrobenchmark {
|
||||
buffer = bufferType.newBuffer();
|
||||
}
|
||||
|
||||
private BBuf buffer;
|
||||
private Buf buffer;
|
||||
|
||||
@TearDown
|
||||
public void tearDown() {
|
||||
@ -92,12 +92,12 @@ public class BBufAccessBenchmark extends AbstractMicrobenchmark {
|
||||
|
||||
@Benchmark
|
||||
public long setGetLong() {
|
||||
return buffer.setLong(0, 1).getLong(0);
|
||||
return buffer.writeLong(0, 1).readLong(0);
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public BBuf setLong() {
|
||||
return buffer.setLong(0, 1);
|
||||
public Buf setLong() {
|
||||
return buffer.writeLong(0, 1);
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
|
Loading…
Reference in New Issue
Block a user