本文整理汇总了Java中com.ociweb.pronghorn.network.schema.NetResponseSchema.MSG_CLOSED_10属性的典型用法代码示例。如果您正苦于以下问题:Java NetResponseSchema.MSG_CLOSED_10属性的具体用法?Java NetResponseSchema.MSG_CLOSED_10怎么用?Java NetResponseSchema.MSG_CLOSED_10使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.ociweb.pronghorn.network.schema.NetResponseSchema
的用法示例。
在下文中一共展示了NetResponseSchema.MSG_CLOSED_10属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: consumeAllResults
private boolean consumeAllResults(long now) {
boolean didWork = false;
int i;
int usr = usersPerPipe;
while (--usr >= 0) {
i = inputs.length;
while (--i>=0) {
Pipe<NetResponseSchema> pipe = inputs[i];
while (Pipe.hasContentToRead(pipe)) {
didWork=true;
final int msg = Pipe.takeMsgIdx(pipe);
switch (msg) {
case NetResponseSchema.MSG_RESPONSE_101:
case NetResponseSchema.MSG_CONTINUATION_102:
long conId = Pipe.takeLong(pipe);
int flags = Pipe.takeInt(pipe);
//TODO: this is a serious issue we request on 1 pipe but they come back on another....
int userIdx = userIdFromConnectionId[(int)conId];
int meta = Pipe.takeRingByteMetaData(inputs[i]); //TODO: DANGER, write helper method that does this for low level users.
int len = Pipe.takeRingByteLen(pipe);
int pos = Pipe.bytePosition(meta, pipe, len);
//TODO: test data is missing these values, must set...
//if (0 != (ServerCoordinator.END_RESPONSE_MASK&flags)) {
totalReceived++;
if (--toRecieve[userIdx]==0) {
if (--shutdownCount == 0) {
//logger.trace("full shutdown now {}",shutdownCount);
requestShutdown();
break;
}
//logger.trace("shutdown remaining {} for user {}",shutdownCount,userId);
}
//}
if (false) {
testExpectedValues(i, len, pos);
}
break;
case NetResponseSchema.MSG_CLOSED_10:
int meta2 = Pipe.takeRingByteMetaData(pipe);
int len2 = Pipe.takeRingByteLen(pipe);
Pipe.bytePosition(meta2, pipe, len2);
Pipe.takeInt(pipe);
break;
case -1:
//EOF
break;
default:
throw new UnsupportedOperationException(msg+" "+pipe.toString());
}
Pipe.confirmLowLevelRead(pipe, Pipe.sizeOf(NetResponseSchema.instance, msg));
Pipe.releaseReadLock(pipe);
lastTime = now;
}
}
}
return didWork;
}