- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.getLength()
方法的一些代码示例,展示了XByteBuffer.getLength()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XByteBuffer.getLength()
方法的具体详情如下:
包路径:org.apache.catalina.tribes.io.XByteBuffer
类名称:XByteBuffer
方法名:getLength
暂无
代码示例来源:origin: org.apache.tomcat/tomcat-tribes
public int getDataPackageLength() {
int length =
4 + //options
8 + //timestamp off=4
4 + //unique id length off=12
uniqueId.length+ //id data off=12+uniqueId.length
4 + //addr length off=12+uniqueId.length+4
address.getDataLength()+ //member data off=12+uniqueId.length+4+add.length
4 + //message length off=12+uniqueId.length+4+add.length+4
message.getLength();
return length;
}
代码示例来源:origin: codefollower/Tomcat-Research
public int getDataPackageLength() {
int length =
4 + //options
8 + //timestamp off=4
4 + //unique id length off=12
uniqueId.length+ //id data off=12+uniqueId.length
4 + //addr length off=12+uniqueId.length+4
address.getDataLength()+ //member data off=12+uniqueId.length+4+add.length
4 + //message length off=12+uniqueId.length+4+add.length+4
message.getLength();
return length;
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/tribes
public int getDataPackageLength() {
int length =
4 + //options
8 + //timestamp off=4
4 + //unique id length off=12
uniqueId.length+ //id data off=12+uniqueId.length
4 + //addr length off=12+uniqueId.length+4
((MemberImpl)address).getDataLength()+ //member data off=12+uniqueId.length+4+add.length
4 + //message length off=12+uniqueId.length+4+add.length+4
message.getLength();
return length;
}
代码示例来源:origin: codefollower/Tomcat-Research
public ChannelMessage assemble() {
if ( !complete() ) throw new IllegalStateException("Fragments are missing.");
int buffersize = 0;
for (int i=0; i<frags.length; i++ ) buffersize += frags[i].getLength();
XByteBuffer buf = new XByteBuffer(buffersize,false);
msg.setMessage(buf);
for ( int i=0; i<frags.length; i++ ) {
msg.getMessage().append(frags[i].getBytesDirect(),0,frags[i].getLength());
}
return msg;
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/tribes
public ChannelMessage assemble() {
if ( !complete() ) throw new IllegalStateException("Fragments are missing.");
int buffersize = 0;
for (int i=0; i<frags.length; i++ ) buffersize += frags[i].getLength();
XByteBuffer buf = new XByteBuffer(buffersize,false);
msg.setMessage(buf);
for ( int i=0; i<frags.length; i++ ) {
msg.getMessage().append(frags[i].getBytesDirect(),0,frags[i].getLength());
}
return msg;
}
代码示例来源:origin: org.apache.catalina.springsource/com.springsource.org.apache.catalina.tribes.springsource
public FragCollection(ChannelMessage msg) {
//get the total messages
int count = XByteBuffer.toInt(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-4);
frags = new XByteBuffer[count];
this.msg = msg;
}
代码示例来源:origin: org.apache.tomcat/tomcat-tribes
public FragCollection(ChannelMessage msg) {
//get the total messages
int count = XByteBuffer.toInt(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-4);
frags = new XByteBuffer[count];
this.msg = msg;
}
代码示例来源:origin: org.apache.catalina.springsource/com.springsource.org.apache.catalina.tribes.springsource
public void messageReceived(ChannelMessage msg) {
//catch incoming
boolean process = true;
if ( okToProcess(msg.getOptions()) ) {
//check to see if it is a testMessage, if so, process = false
process = ( (msg.getMessage().getLength() != TCP_FAIL_DETECT.length) ||
(!Arrays.equals(TCP_FAIL_DETECT,msg.getMessage().getBytes()) ) );
}//end if
//ignore the message, it doesnt have the flag set
if ( process ) super.messageReceived(msg);
else if ( log.isDebugEnabled() ) log.debug("Received a failure detector packet:"+msg);
}//messageReceived
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
int size = msg.getMessage().getLength();
boolean frag = (size>maxSize) && okToProcess(msg.getOptions());
if ( frag ) {
frag(destination, msg, payload);
} else {
msg.getMessage().append(frag);
super.sendMessage(destination, msg, payload);
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-tribes
@Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
int size = msg.getMessage().getLength();
boolean frag = (size>maxSize) && okToProcess(msg.getOptions());
if ( frag ) {
frag(destination, msg, payload);
} else {
msg.getMessage().append(frag);
super.sendMessage(destination, msg, payload);
}
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public void messageReceived(ChannelMessage msg) {
boolean isFrag = XByteBuffer.toBoolean(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-1);
msg.getMessage().trim(1);
if ( isFrag ) {
defrag(msg);
} else {
super.messageReceived(msg);
}
}
代码示例来源:origin: org.apache.catalina.springsource/com.springsource.org.apache.catalina.tribes.springsource
public void messageReceived(ChannelMessage msg) {
boolean isFrag = XByteBuffer.toBoolean(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-1);
msg.getMessage().trim(1);
if ( isFrag ) {
defrag(msg);
} else {
super.messageReceived(msg);
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-tribes
@Override
public void messageReceived(ChannelMessage msg) {
boolean isFrag = XByteBuffer.toBoolean(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-1);
msg.getMessage().trim(1);
if ( isFrag ) {
defrag(msg);
} else {
super.messageReceived(msg);
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-tribes
public void addMessage(ChannelMessage msg) {
//remove the total messages
msg.getMessage().trim(4);
//get the msg nr
int nr = XByteBuffer.toInt(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-4);
//remove the msg nr
msg.getMessage().trim(4);
frags[nr] = msg.getMessage();
}
代码示例来源:origin: codefollower/Tomcat-Research
public void addMessage(ChannelMessage msg) {
//remove the total messages
msg.getMessage().trim(4);
//get the msg nr
int nr = XByteBuffer.toInt(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-4);
//remove the msg nr
msg.getMessage().trim(4);
frags[nr] = msg.getMessage();
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/tribes
public void addMessage(ChannelMessage msg) {
//remove the total messages
msg.getMessage().trim(4);
//get the msg nr
int nr = XByteBuffer.toInt(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-4);
//remove the msg nr
msg.getMessage().trim(4);
frags[nr] = msg.getMessage();
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public void messageReceived(ChannelMessage msg) {
try {
byte[] data = decompress(msg.getMessage().getBytes());
msg.getMessage().trim(msg.getMessage().getLength());
msg.getMessage().append(data,0,data.length);
super.messageReceived(msg);
} catch ( IOException x ) {
log.error("Unable to decompress byte contents",x);
}
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
try {
byte[] data = compress(msg.getMessage().getBytes());
msg.getMessage().trim(msg.getMessage().getLength());
msg.getMessage().append(data,0,data.length);
super.sendMessage(destination, msg, payload);
} catch ( IOException x ) {
log.error("Unable to compress byte contents");
throw new ChannelException(x);
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/tribes
@Override
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
try {
byte[] data = compress(msg.getMessage().getBytes());
msg.getMessage().trim(msg.getMessage().getLength());
msg.getMessage().append(data,0,data.length);
getNext().sendMessage(destination, msg, payload);
} catch ( IOException x ) {
log.error("Unable to compress byte contents");
throw new ChannelException(x);
}
}
代码示例来源:origin: org.apache.catalina.springsource/com.springsource.org.apache.catalina.tribes.springsource
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
try {
byte[] data = compress(msg.getMessage().getBytes());
msg.getMessage().trim(msg.getMessage().getLength());
msg.getMessage().append(data,0,data.length);
getNext().sendMessage(destination, msg, payload);
} catch ( IOException x ) {
log.error("Unable to compress byte contents");
throw new ChannelException(x);
}
}
我在我的服务器中使用静态成员部落配置进行 Tomcat session 复制,并且工作正常。但是,我想在应用程序中利用相同的设置在集群成员之间发送消息,以促进我的应用程序使用的事件架构。我想使用它的原
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer类的一些代码示例,展示了XByteBuffer类的具体用法。这些代码示例主要来源于Github/S
我已阅读 Clustering/Session Replication HOW-TO对于Tomcat 7。我想配置一个密码,以确保未经授权的节点无法加入集群。 我原以为可以在 Tomcat serve
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.getCapacity()方法的一些代码示例,展示了XByteBuffer.getCapacit
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.extractPackage()方法的一些代码示例,展示了XByteBuffer.extract
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.clear()方法的一些代码示例,展示了XByteBuffer.clear()的具体用法。这些代
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.firstIndexOf()方法的一些代码示例,展示了XByteBuffer.firstInde
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.toBytes()方法的一些代码示例,展示了XByteBuffer.toBytes()的具体用法
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.setLength()方法的一些代码示例,展示了XByteBuffer.setLength()的
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.serialize()方法的一些代码示例,展示了XByteBuffer.serialize()的
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.getBytes()方法的一些代码示例,展示了XByteBuffer.getBytes()的具体
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.expand()方法的一些代码示例,展示了XByteBuffer.expand()的具体用法。这
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.toLong()方法的一些代码示例,展示了XByteBuffer.toLong()的具体用法。这
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.getBytesDirect()方法的一些代码示例,展示了XByteBuffer.getByte
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.toInt()方法的一些代码示例,展示了XByteBuffer.toInt()的具体用法。这些代
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.()方法的一些代码示例,展示了XByteBuffer.()的具体用法。这些代码示例主要来源于Gi
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.trim()方法的一些代码示例,展示了XByteBuffer.trim()的具体用法。这些代码示
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.createDataPackage()方法的一些代码示例,展示了XByteBuffer.crea
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.reset()方法的一些代码示例,展示了XByteBuffer.reset()的具体用法。这些代
本文整理了Java中org.apache.catalina.tribes.io.XByteBuffer.toBoolean()方法的一些代码示例,展示了XByteBuffer.toBoolean()的
我是一名优秀的程序员,十分优秀!