延迟优化

This commit is contained in:
Administrator
2022-11-26 08:22:16 +08:00
parent 0b5ff2465b
commit 479204919b
4 changed files with 110 additions and 99 deletions
@@ -3,13 +3,13 @@ package org.kne.cloud.network.klalb;
import java.util.Arrays;
import java.util.Objects;
public class KLALBBlock implements Comparable<KLALBBlock>{
public class KLALBBlock {
volatile byte[]data;
volatile int size;
volatile long number;
volatile long time=-1;
//volatile long time=-1;
volatile Thread thread;
public KLALBBlock(byte[] b, int size,long number) {
data=b;
@@ -42,16 +42,6 @@ public class KLALBBlock implements Comparable<KLALBBlock>{
KLALBBlock other = (KLALBBlock) obj;
return number == other.number;
}
@Override
public int compareTo(KLALBBlock o) {
if(time>o.time) {
return 1;
}else if(time<o.time){
return -1;
}else {
return 0;
}
}
}