This commit is contained in:
Redkale
2018-07-30 15:26:47 +08:00
parent 991dba0d62
commit 15f856b762

View File

@@ -42,6 +42,9 @@ public abstract class AsyncConnection implements AsynchronousByteChannel, AutoCl
protected Consumer<AsyncConnection> beforeCloseListener;
//关联的事件数, 小于1表示没有事件
protected final AtomicLong eventing = new AtomicLong();
public final long getLastReadTime() {
return readtime;
}
@@ -50,6 +53,14 @@ public abstract class AsyncConnection implements AsynchronousByteChannel, AutoCl
return writetime;
}
public final long increEventing() {
return eventing.incrementAndGet();
}
public final long decreEventing() {
return eventing.decrementAndGet();
}
public abstract boolean isTCP();
public abstract boolean shutdownInput();