本文整理了Java中io.rsocket.Frame.release()
方法的一些代码示例,展示了Frame.release()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Frame.release()
方法的具体详情如下:
包路径:io.rsocket.Frame
类名称:Frame
方法名:release
暂无
代码示例来源:origin: rsocket/rsocket-java
@Override
protected void deallocate() {
setupFrame.release();
}
}
代码示例来源:origin: rsocket/rsocket-java
public void updateRemotePosition(int remotePosition) {
if (remotePosition > currentPosition) {
throw new IllegalStateException(
"Remote ahead of " + lastRemotePosition + " , expected " + remotePosition);
}
if (remotePosition == lastRemotePosition) {
return;
}
if (remotePosition < lastRemotePosition) {
throw new IllegalStateException(
"Remote position moved back from " + lastRemotePosition + " to " + remotePosition);
}
lastRemotePosition = remotePosition;
Iterator<Map.Entry<Integer, Frame>> positions = frames.entrySet().iterator();
while (positions.hasNext()) {
Map.Entry<Integer, Frame> cachePosition = positions.next();
if (cachePosition.getKey() <= remotePosition) {
positions.remove();
bufferSize -= strategy.cost(cachePosition.getValue());
cachePosition.getValue().release();
}
// TODO check for a bad position
}
}
代码示例来源:origin: rsocket/rsocket-java
private void handleIncomingFrames(Frame frame) {
try {
int streamId = frame.getStreamId();
FrameType type = frame.getType();
if (streamId == 0) {
handleStreamZero(type, frame);
} else {
handleFrame(streamId, type, frame);
}
} finally {
frame.release();
}
}
代码示例来源:origin: rsocket/rsocket-java
frame.release();
代码示例来源:origin: io.rsocket/rsocket-core
@Override
protected void deallocate() {
setupFrame.release();
}
}
代码示例来源:origin: io.rsocket/rsocket-core
public void updateRemotePosition(int remotePosition) {
if (remotePosition > currentPosition) {
throw new IllegalStateException(
"Remote ahead of " + lastRemotePosition + " , expected " + remotePosition);
}
if (remotePosition == lastRemotePosition) {
return;
}
if (remotePosition < lastRemotePosition) {
throw new IllegalStateException(
"Remote position moved back from " + lastRemotePosition + " to " + remotePosition);
}
lastRemotePosition = remotePosition;
Iterator<Map.Entry<Integer, Frame>> positions = frames.entrySet().iterator();
while (positions.hasNext()) {
Map.Entry<Integer, Frame> cachePosition = positions.next();
if (cachePosition.getKey() <= remotePosition) {
positions.remove();
bufferSize -= strategy.cost(cachePosition.getValue());
cachePosition.getValue().release();
}
// TODO check for a bad position
}
}
代码示例来源:origin: rsocket/rsocket-java
int version = Frame.Setup.version(setupFrame);
if (version != SetupFrameFlyweight.CURRENT_VERSION) {
setupFrame.release();
InvalidSetupException error =
new InvalidSetupException(
代码示例来源:origin: io.rsocket/rsocket-core
private void handleIncomingFrames(Frame frame) {
try {
int streamId = frame.getStreamId();
FrameType type = frame.getType();
if (streamId == 0) {
handleStreamZero(type, frame);
} else {
handleFrame(streamId, type, frame);
}
} finally {
frame.release();
}
}
代码示例来源:origin: io.rsocket/rsocket-core
frame.release();
代码示例来源:origin: io.rsocket/rsocket-core
int version = Frame.Setup.version(setupFrame);
if (version != SetupFrameFlyweight.CURRENT_VERSION) {
setupFrame.release();
InvalidSetupException error =
new InvalidSetupException(
内容来源于网络,如有侵权,请联系作者删除!