延迟优化
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user