forked from KNEMC/KLALB
KLALB 3.6.0开发一半的状态
This commit is contained in:
@@ -3,53 +3,12 @@ package org.kne.cloud.network;
|
||||
import java.io.IOException;
|
||||
import java.nio.channels.ReadableByteChannel;
|
||||
import java.nio.channels.WritableByteChannel;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import org.kne.cloud.network.klalb.KLALBPacket;
|
||||
import org.kne.debug.TimeDebugger;
|
||||
|
||||
public abstract class NetworkPacket{
|
||||
private static final boolean debugPassport=false;
|
||||
|
||||
public static final ByteBufferAllocator bufferAllocator=new ByteBufferAllocator(true);
|
||||
|
||||
//public static final ByteArrayPool dataarraypool_65535=new ByteArrayPool(10000, 65535);
|
||||
|
||||
//public static final ByteBufferPool databufferpool_65535=new ByteBufferPool(10000, 65535,false);
|
||||
|
||||
//public static final ByteBufferPool databufferpool_2048=new ByteBufferPool(10000, 2048,false);
|
||||
|
||||
//public static final ByteBufferPool databufferpool_40=new ByteBufferPool(10000, 40,false);
|
||||
|
||||
|
||||
|
||||
private final TimeDebugger passport;
|
||||
{
|
||||
if(debugPassport) {
|
||||
passport=new TimeDebugger();
|
||||
passport.putTime(getClass().getSimpleName()+ "_create");
|
||||
}else {
|
||||
passport=null;
|
||||
}
|
||||
}
|
||||
|
||||
public final void putTimePassport(String label) {
|
||||
if(passport!=null) {
|
||||
passport.putTime(label);
|
||||
}
|
||||
}
|
||||
|
||||
public final void printPassport() {
|
||||
if(passport!=null) {
|
||||
passport.printWithTimeFilter(100000000L);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public abstract long getTotalLength();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user