org.apache.activemq.console.command.store.proto.MessagePB Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of activemq-osgi Show documentation
Show all versions of activemq-osgi Show documentation
Puts together an ActiveMQ OSGi bundle
//
// Generated by protoc, do not edit by hand.
//
package org.apache.activemq.console.command.store.proto;
public class MessagePB implements org.fusesource.hawtbuf.proto.PBMessageFactory {
public static final MessagePB FACTORY = new MessagePB();
public static final org.fusesource.hawtbuf.proto.PBMessageFramedCodec FRAMED_CODEC = new org.fusesource.hawtbuf.proto.PBMessageFramedCodec(FACTORY);
public static final org.fusesource.hawtbuf.proto.PBMessageUnframedCodec UNFRAMED_CODEC = new org.fusesource.hawtbuf.proto.PBMessageUnframedCodec(FACTORY);
public Bean create() {
return new Bean();
}
public Bean parseUnframed(org.fusesource.hawtbuf.proto.CodedInputStream data) throws org.fusesource.hawtbuf.proto.InvalidProtocolBufferException, java.io.IOException {
return new Bean().mergeUnframed(data);
}
public Bean parseUnframed(java.io.InputStream data) throws org.fusesource.hawtbuf.proto.InvalidProtocolBufferException, java.io.IOException {
return parseUnframed(new org.fusesource.hawtbuf.proto.CodedInputStream(data));
}
public Buffer parseUnframed(org.fusesource.hawtbuf.Buffer data) throws org.fusesource.hawtbuf.proto.InvalidProtocolBufferException {
return new Buffer(data);
}
public Buffer parseUnframed(byte[] data) throws org.fusesource.hawtbuf.proto.InvalidProtocolBufferException {
return parseUnframed(new org.fusesource.hawtbuf.Buffer(data));
}
public Buffer parseFramed(org.fusesource.hawtbuf.proto.CodedInputStream data) throws org.fusesource.hawtbuf.proto.InvalidProtocolBufferException, java.io.IOException {
int length = data.readRawVarint32();
int oldLimit = data.pushLimit(length);
Buffer rc = parseUnframed(data.readRawBytes(length));
data.popLimit(oldLimit);
return rc;
}
public Buffer parseFramed(org.fusesource.hawtbuf.Buffer data) throws org.fusesource.hawtbuf.proto.InvalidProtocolBufferException {
try {
org.fusesource.hawtbuf.proto.CodedInputStream input = new org.fusesource.hawtbuf.proto.CodedInputStream(data);
Buffer rc = parseFramed(input);
input.checkLastTagWas(0);
return rc;
} catch (org.fusesource.hawtbuf.proto.InvalidProtocolBufferException e) {
throw e;
} catch (java.io.IOException e) {
throw new RuntimeException("An IOException was thrown (should never happen in this method).", e);
}
}
public Buffer parseFramed(byte[] data) throws org.fusesource.hawtbuf.proto.InvalidProtocolBufferException {
return parseFramed(new org.fusesource.hawtbuf.Buffer(data));
}
public Buffer parseFramed(java.io.InputStream data) throws org.fusesource.hawtbuf.proto.InvalidProtocolBufferException, java.io.IOException {
return parseUnframed(org.fusesource.hawtbuf.proto.MessageBufferSupport.readFrame(data));
}
public interface Getter extends org.fusesource.hawtbuf.proto.PBMessage {
// required int64 messageKey = 1;
public boolean hasMessageKey();
public long getMessageKey();
// required bytes codec = 2;
public boolean hasCodec();
public org.fusesource.hawtbuf.AsciiBuffer getCodec();
// optional int32 size = 3;
public boolean hasSize();
public int getSize();
// optional bytes value = 4;
public boolean hasValue();
public org.fusesource.hawtbuf.Buffer getValue();
// optional sint64 expiration = 5;
public boolean hasExpiration();
public long getExpiration();
// optional int32 compression = 6;
public boolean hasCompression();
public int getCompression();
// optional bytes direct_data = 10;
public boolean hasDirectData();
public org.fusesource.hawtbuf.Buffer getDirectData();
// optional bytes direct_file = 12;
public boolean hasDirectFile();
public org.fusesource.hawtbuf.Buffer getDirectFile();
// optional int64 direct_offset = 13;
public boolean hasDirectOffset();
public long getDirectOffset();
// optional int32 direct_size = 14;
public boolean hasDirectSize();
public int getDirectSize();
public Bean copy();
public Buffer freeze();
public java.lang.StringBuilder toString(java.lang.StringBuilder sb, String prefix);
}
static public final class Bean implements Getter {
Buffer frozen;
Bean bean;
public Bean() {
this.bean = this;
}
public Bean(Bean copy) {
this.bean = copy;
}
public Bean copy() {
return new Bean(bean);
}
public boolean frozen() {
return frozen!=null;
}
public Buffer freeze() {
if( frozen==null ) {
frozen = new Buffer(bean);
assert deepFreeze();
}
return frozen;
}
private boolean deepFreeze() {
frozen.serializedSizeUnframed();
return true;
}
private void copyCheck() {
assert frozen==null : org.fusesource.hawtbuf.proto.MessageBufferSupport.FORZEN_ERROR_MESSAGE;
if (bean != this) {
copy(bean);
}
}
private void copy(Bean other) {
this.bean = this;
this.f_messageKey = other.f_messageKey;
this.b_messageKey = other.b_messageKey;
this.f_codec = other.f_codec;
this.f_size = other.f_size;
this.b_size = other.b_size;
this.f_value = other.f_value;
this.f_expiration = other.f_expiration;
this.b_expiration = other.b_expiration;
this.f_compression = other.f_compression;
this.b_compression = other.b_compression;
this.f_directData = other.f_directData;
this.f_directFile = other.f_directFile;
this.f_directOffset = other.f_directOffset;
this.b_directOffset = other.b_directOffset;
this.f_directSize = other.f_directSize;
this.b_directSize = other.b_directSize;
}
// required int64 messageKey = 1;
private long f_messageKey = 0;
private boolean b_messageKey;
public boolean hasMessageKey() {
return bean.b_messageKey;
}
public long getMessageKey() {
return bean.f_messageKey;
}
public Bean setMessageKey(long messageKey) {
copyCheck();
this.b_messageKey = true;
this.f_messageKey = messageKey;
return this;
}
public void clearMessageKey() {
copyCheck();
this.b_messageKey = false;
this.f_messageKey = 0;
}
// required bytes codec = 2;
private org.fusesource.hawtbuf.AsciiBuffer f_codec = null;
public boolean hasCodec() {
return bean.f_codec!=null;
}
public org.fusesource.hawtbuf.AsciiBuffer getCodec() {
return bean.f_codec;
}
public Bean setCodec(org.fusesource.hawtbuf.AsciiBuffer codec) {
copyCheck();
this.f_codec = codec;
return this;
}
public void clearCodec() {
copyCheck();
this.f_codec = null;
}
// optional int32 size = 3;
private int f_size = 0;
private boolean b_size;
public boolean hasSize() {
return bean.b_size;
}
public int getSize() {
return bean.f_size;
}
public Bean setSize(int size) {
copyCheck();
this.b_size = true;
this.f_size = size;
return this;
}
public void clearSize() {
copyCheck();
this.b_size = false;
this.f_size = 0;
}
// optional bytes value = 4;
private org.fusesource.hawtbuf.Buffer f_value = null;
public boolean hasValue() {
return bean.f_value!=null;
}
public org.fusesource.hawtbuf.Buffer getValue() {
return bean.f_value;
}
public Bean setValue(org.fusesource.hawtbuf.Buffer value) {
copyCheck();
this.f_value = value;
return this;
}
public void clearValue() {
copyCheck();
this.f_value = null;
}
// optional sint64 expiration = 5;
private long f_expiration = 0;
private boolean b_expiration;
public boolean hasExpiration() {
return bean.b_expiration;
}
public long getExpiration() {
return bean.f_expiration;
}
public Bean setExpiration(long expiration) {
copyCheck();
this.b_expiration = true;
this.f_expiration = expiration;
return this;
}
public void clearExpiration() {
copyCheck();
this.b_expiration = false;
this.f_expiration = 0;
}
// optional int32 compression = 6;
private int f_compression = 0;
private boolean b_compression;
public boolean hasCompression() {
return bean.b_compression;
}
public int getCompression() {
return bean.f_compression;
}
public Bean setCompression(int compression) {
copyCheck();
this.b_compression = true;
this.f_compression = compression;
return this;
}
public void clearCompression() {
copyCheck();
this.b_compression = false;
this.f_compression = 0;
}
// optional bytes direct_data = 10;
private org.fusesource.hawtbuf.Buffer f_directData = null;
public boolean hasDirectData() {
return bean.f_directData!=null;
}
public org.fusesource.hawtbuf.Buffer getDirectData() {
return bean.f_directData;
}
public Bean setDirectData(org.fusesource.hawtbuf.Buffer directData) {
copyCheck();
this.f_directData = directData;
return this;
}
public void clearDirectData() {
copyCheck();
this.f_directData = null;
}
// optional bytes direct_file = 12;
private org.fusesource.hawtbuf.Buffer f_directFile = null;
public boolean hasDirectFile() {
return bean.f_directFile!=null;
}
public org.fusesource.hawtbuf.Buffer getDirectFile() {
return bean.f_directFile;
}
public Bean setDirectFile(org.fusesource.hawtbuf.Buffer directFile) {
copyCheck();
this.f_directFile = directFile;
return this;
}
public void clearDirectFile() {
copyCheck();
this.f_directFile = null;
}
// optional int64 direct_offset = 13;
private long f_directOffset = 0;
private boolean b_directOffset;
public boolean hasDirectOffset() {
return bean.b_directOffset;
}
public long getDirectOffset() {
return bean.f_directOffset;
}
public Bean setDirectOffset(long directOffset) {
copyCheck();
this.b_directOffset = true;
this.f_directOffset = directOffset;
return this;
}
public void clearDirectOffset() {
copyCheck();
this.b_directOffset = false;
this.f_directOffset = 0;
}
// optional int32 direct_size = 14;
private int f_directSize = 0;
private boolean b_directSize;
public boolean hasDirectSize() {
return bean.b_directSize;
}
public int getDirectSize() {
return bean.f_directSize;
}
public Bean setDirectSize(int directSize) {
copyCheck();
this.b_directSize = true;
this.f_directSize = directSize;
return this;
}
public void clearDirectSize() {
copyCheck();
this.b_directSize = false;
this.f_directSize = 0;
}
public String toString() {
return toString(new java.lang.StringBuilder(), "").toString();
}
public java.lang.StringBuilder toString(java.lang.StringBuilder sb, String prefix) {
if( hasMessageKey() ) {
sb.append(prefix+"messageKey: ");
sb.append(getMessageKey());
sb.append("\n");
}
if( hasCodec() ) {
sb.append(prefix+"codec: ");
sb.append(getCodec());
sb.append("\n");
}
if( hasSize() ) {
sb.append(prefix+"size: ");
sb.append(getSize());
sb.append("\n");
}
if( hasValue() ) {
sb.append(prefix+"value: ");
sb.append(getValue());
sb.append("\n");
}
if( hasExpiration() ) {
sb.append(prefix+"expiration: ");
sb.append(getExpiration());
sb.append("\n");
}
if( hasCompression() ) {
sb.append(prefix+"compression: ");
sb.append(getCompression());
sb.append("\n");
}
if( hasDirectData() ) {
sb.append(prefix+"direct_data: ");
sb.append(getDirectData());
sb.append("\n");
}
if( hasDirectFile() ) {
sb.append(prefix+"direct_file: ");
sb.append(getDirectFile());
sb.append("\n");
}
if( hasDirectOffset() ) {
sb.append(prefix+"direct_offset: ");
sb.append(getDirectOffset());
sb.append("\n");
}
if( hasDirectSize() ) {
sb.append(prefix+"direct_size: ");
sb.append(getDirectSize());
sb.append("\n");
}
return sb;
}
public Bean mergeUnframed(java.io.InputStream input) throws java.io.IOException {
return mergeUnframed(new org.fusesource.hawtbuf.proto.CodedInputStream(input));
}
public Bean mergeUnframed(org.fusesource.hawtbuf.proto.CodedInputStream input) throws java.io.IOException {
copyCheck();
while (true) {
int tag = input.readTag();
if ((tag & 0x07) == 4) {
return this;
}
switch (tag) {
case 0:
return this;
default: {
input.skipField(tag);
break;
}
case 8:
setMessageKey(input.readInt64());
break;
case 18:
setCodec(new org.fusesource.hawtbuf.AsciiBuffer(input.readBytes()));
break;
case 24:
setSize(input.readInt32());
break;
case 34:
setValue(input.readBytes());
break;
case 40:
setExpiration(input.readSInt64());
break;
case 48:
setCompression(input.readInt32());
break;
case 82:
setDirectData(input.readBytes());
break;
case 98:
setDirectFile(input.readBytes());
break;
case 104:
setDirectOffset(input.readInt64());
break;
case 112:
setDirectSize(input.readInt32());
break;
}
}
}
public boolean equals(Object obj) {
if( obj==this )
return true;
if( obj==null || obj.getClass()!=Bean.class )
return false;
return equals((Bean)obj);
}
public boolean equals(Bean obj) {
if (hasMessageKey() ^ obj.hasMessageKey() )
return false;
if (hasMessageKey() && ( getMessageKey()!=obj.getMessageKey() ))
return false;
if (hasCodec() ^ obj.hasCodec() )
return false;
if (hasCodec() && ( !getCodec().equals(obj.getCodec()) ))
return false;
if (hasSize() ^ obj.hasSize() )
return false;
if (hasSize() && ( getSize()!=obj.getSize() ))
return false;
if (hasValue() ^ obj.hasValue() )
return false;
if (hasValue() && ( !getValue().equals(obj.getValue()) ))
return false;
if (hasExpiration() ^ obj.hasExpiration() )
return false;
if (hasExpiration() && ( getExpiration()!=obj.getExpiration() ))
return false;
if (hasCompression() ^ obj.hasCompression() )
return false;
if (hasCompression() && ( getCompression()!=obj.getCompression() ))
return false;
if (hasDirectData() ^ obj.hasDirectData() )
return false;
if (hasDirectData() && ( !getDirectData().equals(obj.getDirectData()) ))
return false;
if (hasDirectFile() ^ obj.hasDirectFile() )
return false;
if (hasDirectFile() && ( !getDirectFile().equals(obj.getDirectFile()) ))
return false;
if (hasDirectOffset() ^ obj.hasDirectOffset() )
return false;
if (hasDirectOffset() && ( getDirectOffset()!=obj.getDirectOffset() ))
return false;
if (hasDirectSize() ^ obj.hasDirectSize() )
return false;
if (hasDirectSize() && ( getDirectSize()!=obj.getDirectSize() ))
return false;
return true;
}
public int hashCode() {
int rc=2066384;
if (hasMessageKey()) {
rc ^= ( 302723320^(new Long(getMessageKey())).hashCode() );
}
if (hasCodec()) {
rc ^= ( 65282038^getCodec().hashCode() );
}
if (hasSize()) {
rc ^= ( 2577441^getSize() );
}
if (hasValue()) {
rc ^= ( 82420049^getValue().hashCode() );
}
if (hasExpiration()) {
rc ^= ( 1155999439^(new Long(getExpiration())).hashCode() );
}
if (hasCompression()) {
rc ^= ( -1195114170^getCompression() );
}
if (hasDirectData()) {
rc ^= ( -2078163117^getDirectData().hashCode() );
}
if (hasDirectFile()) {
rc ^= ( -2078096091^getDirectFile().hashCode() );
}
if (hasDirectOffset()) {
rc ^= ( 364178940^(new Long(getDirectOffset())).hashCode() );
}
if (hasDirectSize()) {
rc ^= ( -2077708374^getDirectSize() );
}
return rc;
}
public Bean mergeFrom(Getter other) {
copyCheck();
if (other.hasMessageKey()) {
setMessageKey(other.getMessageKey());
}
if (other.hasCodec()) {
setCodec(other.getCodec());
}
if (other.hasSize()) {
setSize(other.getSize());
}
if (other.hasValue()) {
setValue(other.getValue());
}
if (other.hasExpiration()) {
setExpiration(other.getExpiration());
}
if (other.hasCompression()) {
setCompression(other.getCompression());
}
if (other.hasDirectData()) {
setDirectData(other.getDirectData());
}
if (other.hasDirectFile()) {
setDirectFile(other.getDirectFile());
}
if (other.hasDirectOffset()) {
setDirectOffset(other.getDirectOffset());
}
if (other.hasDirectSize()) {
setDirectSize(other.getDirectSize());
}
return this;
}
public void clear() {
clearMessageKey();
clearCodec();
clearSize();
clearValue();
clearExpiration();
clearCompression();
clearDirectData();
clearDirectFile();
clearDirectOffset();
clearDirectSize();
}
public void readExternal(java.io.DataInput in) throws java.io.IOException {
assert frozen==null : org.fusesource.hawtbuf.proto.MessageBufferSupport.FORZEN_ERROR_MESSAGE;
bean = this;
frozen = null;
f_messageKey = in.readLong();
b_messageKey = true;
{
int size = in.readInt();
if( size>=0 ) {
byte b[] = new byte[size];
in.readFully(b);
f_codec = new org.fusesource.hawtbuf.AsciiBuffer(b);
} else {
f_codec = null;
}
}
f_size = in.readInt();
b_size = true;
{
int size = in.readInt();
if( size>=0 ) {
byte b[] = new byte[size];
in.readFully(b);
f_value = new org.fusesource.hawtbuf.Buffer(b);
} else {
f_value = null;
}
}
f_expiration = in.readLong();
b_expiration = true;
f_compression = in.readInt();
b_compression = true;
{
int size = in.readInt();
if( size>=0 ) {
byte b[] = new byte[size];
in.readFully(b);
f_directData = new org.fusesource.hawtbuf.Buffer(b);
} else {
f_directData = null;
}
}
{
int size = in.readInt();
if( size>=0 ) {
byte b[] = new byte[size];
in.readFully(b);
f_directFile = new org.fusesource.hawtbuf.Buffer(b);
} else {
f_directFile = null;
}
}
f_directOffset = in.readLong();
b_directOffset = true;
f_directSize = in.readInt();
b_directSize = true;
}
public void writeExternal(java.io.DataOutput out) throws java.io.IOException {
out.writeLong(bean.f_messageKey);
if( bean.f_codec!=null ) {
out.writeInt(bean.f_codec.getLength());
out.write(bean.f_codec.getData(), bean.f_codec.getOffset(), bean.f_codec.getLength());
} else {
out.writeInt(-1);
}
out.writeInt(bean.f_size);
if( bean.f_value!=null ) {
out.writeInt(bean.f_value.getLength());
out.write(bean.f_value.getData(), bean.f_value.getOffset(), bean.f_value.getLength());
} else {
out.writeInt(-1);
}
out.writeLong(bean.f_expiration);
out.writeInt(bean.f_compression);
if( bean.f_directData!=null ) {
out.writeInt(bean.f_directData.getLength());
out.write(bean.f_directData.getData(), bean.f_directData.getOffset(), bean.f_directData.getLength());
} else {
out.writeInt(-1);
}
if( bean.f_directFile!=null ) {
out.writeInt(bean.f_directFile.getLength());
out.write(bean.f_directFile.getData(), bean.f_directFile.getOffset(), bean.f_directFile.getLength());
} else {
out.writeInt(-1);
}
out.writeLong(bean.f_directOffset);
out.writeInt(bean.f_directSize);
}
}
static public final class Buffer implements org.fusesource.hawtbuf.proto.MessageBuffer, Getter {
private Bean bean;
private org.fusesource.hawtbuf.Buffer buffer;
private int size=-1;
private int hashCode;
private Buffer(org.fusesource.hawtbuf.Buffer buffer) {
this.buffer = buffer;
}
private Buffer(Bean bean) {
this.bean = bean;
}
public Bean copy() {
return bean().copy();
}
public Buffer freeze() {
return this;
}
private Bean bean() {
if (bean == null) {
try {
bean = new Bean().mergeUnframed(new org.fusesource.hawtbuf.proto.CodedInputStream(buffer));
bean.frozen=this;
} catch (org.fusesource.hawtbuf.proto.InvalidProtocolBufferException e) {
throw new RuntimeException(e);
} catch (java.io.IOException e) {
throw new RuntimeException("An IOException was thrown (should never happen in this method).", e);
}
}
return bean;
}
public String toString() {
return bean().toString();
}
public java.lang.StringBuilder toString(java.lang.StringBuilder sb, String prefix) {
return bean().toString(sb, prefix);
}
// required int64 messageKey = 1;
public boolean hasMessageKey() {
return bean().hasMessageKey();
}
public long getMessageKey() {
return bean().getMessageKey();
}
// required bytes codec = 2;
public boolean hasCodec() {
return bean().hasCodec();
}
public org.fusesource.hawtbuf.AsciiBuffer getCodec() {
return bean().getCodec();
}
// optional int32 size = 3;
public boolean hasSize() {
return bean().hasSize();
}
public int getSize() {
return bean().getSize();
}
// optional bytes value = 4;
public boolean hasValue() {
return bean().hasValue();
}
public org.fusesource.hawtbuf.Buffer getValue() {
return bean().getValue();
}
// optional sint64 expiration = 5;
public boolean hasExpiration() {
return bean().hasExpiration();
}
public long getExpiration() {
return bean().getExpiration();
}
// optional int32 compression = 6;
public boolean hasCompression() {
return bean().hasCompression();
}
public int getCompression() {
return bean().getCompression();
}
// optional bytes direct_data = 10;
public boolean hasDirectData() {
return bean().hasDirectData();
}
public org.fusesource.hawtbuf.Buffer getDirectData() {
return bean().getDirectData();
}
// optional bytes direct_file = 12;
public boolean hasDirectFile() {
return bean().hasDirectFile();
}
public org.fusesource.hawtbuf.Buffer getDirectFile() {
return bean().getDirectFile();
}
// optional int64 direct_offset = 13;
public boolean hasDirectOffset() {
return bean().hasDirectOffset();
}
public long getDirectOffset() {
return bean().getDirectOffset();
}
// optional int32 direct_size = 14;
public boolean hasDirectSize() {
return bean().hasDirectSize();
}
public int getDirectSize() {
return bean().getDirectSize();
}
public org.fusesource.hawtbuf.Buffer toUnframedBuffer() {
if( buffer !=null ) {
return buffer;
}
return org.fusesource.hawtbuf.proto.MessageBufferSupport.toUnframedBuffer(this);
}
public org.fusesource.hawtbuf.Buffer toFramedBuffer() {
return org.fusesource.hawtbuf.proto.MessageBufferSupport.toFramedBuffer(this);
}
public byte[] toUnframedByteArray() {
return toUnframedBuffer().toByteArray();
}
public byte[] toFramedByteArray() {
return toFramedBuffer().toByteArray();
}
public void writeFramed(org.fusesource.hawtbuf.proto.CodedOutputStream output) throws java.io.IOException {
output.writeRawVarint32(serializedSizeUnframed());
writeUnframed(output);
}
public void writeFramed(java.io.OutputStream output) throws java.io.IOException {
org.fusesource.hawtbuf.proto.CodedOutputStream codedOutput = new org.fusesource.hawtbuf.proto.CodedOutputStream(output);
writeFramed(codedOutput);
codedOutput.flush();
}
public void writeUnframed(java.io.OutputStream output) throws java.io.IOException {
org.fusesource.hawtbuf.proto.CodedOutputStream codedOutput = new org.fusesource.hawtbuf.proto.CodedOutputStream(output);
writeUnframed(codedOutput);
codedOutput.flush();
}
public void writeUnframed(org.fusesource.hawtbuf.proto.CodedOutputStream output) throws java.io.IOException {
if (buffer == null) {
int size = serializedSizeUnframed();
buffer = output.getNextBuffer(size);
org.fusesource.hawtbuf.proto.CodedOutputStream original=null;
if( buffer == null ) {
buffer = new org.fusesource.hawtbuf.Buffer(new byte[size]);
original = output;
output = new org.fusesource.hawtbuf.proto.CodedOutputStream(buffer);
}
output.writeInt64(1, bean.getMessageKey());
output.writeBytes(2, bean.getCodec());
if (bean.hasSize()) {
output.writeInt32(3, bean.getSize());
}
if (bean.hasValue()) {
output.writeBytes(4, bean.getValue());
}
if (bean.hasExpiration()) {
output.writeSInt64(5, bean.getExpiration());
}
if (bean.hasCompression()) {
output.writeInt32(6, bean.getCompression());
}
if (bean.hasDirectData()) {
output.writeBytes(10, bean.getDirectData());
}
if (bean.hasDirectFile()) {
output.writeBytes(12, bean.getDirectFile());
}
if (bean.hasDirectOffset()) {
output.writeInt64(13, bean.getDirectOffset());
}
if (bean.hasDirectSize()) {
output.writeInt32(14, bean.getDirectSize());
}
if( original !=null ) {
output.checkNoSpaceLeft();
output = original;
output.writeRawBytes(buffer);
}
} else {
output.writeRawBytes(buffer);
}
}
public int serializedSizeFramed() {
int t = serializedSizeUnframed();
return org.fusesource.hawtbuf.proto.CodedOutputStream.computeRawVarint32Size(t) + t;
}
public int serializedSizeUnframed() {
if (buffer != null) {
return buffer.length;
}
if (size != -1)
return size;
size = 0;
size += org.fusesource.hawtbuf.proto.CodedOutputStream.computeInt64Size(1, getMessageKey());
size += org.fusesource.hawtbuf.proto.CodedOutputStream.computeBytesSize(2, getCodec());
if (hasSize()) {
size += org.fusesource.hawtbuf.proto.CodedOutputStream.computeInt32Size(3, getSize());
}
if (hasValue()) {
size += org.fusesource.hawtbuf.proto.CodedOutputStream.computeBytesSize(4, getValue());
}
if (hasExpiration()) {
size += org.fusesource.hawtbuf.proto.CodedOutputStream.computeSInt64Size(5, getExpiration());
}
if (hasCompression()) {
size += org.fusesource.hawtbuf.proto.CodedOutputStream.computeInt32Size(6, getCompression());
}
if (hasDirectData()) {
size += org.fusesource.hawtbuf.proto.CodedOutputStream.computeBytesSize(10, getDirectData());
}
if (hasDirectFile()) {
size += org.fusesource.hawtbuf.proto.CodedOutputStream.computeBytesSize(12, getDirectFile());
}
if (hasDirectOffset()) {
size += org.fusesource.hawtbuf.proto.CodedOutputStream.computeInt64Size(13, getDirectOffset());
}
if (hasDirectSize()) {
size += org.fusesource.hawtbuf.proto.CodedOutputStream.computeInt32Size(14, getDirectSize());
}
return size;
}
public boolean equals(Object obj) {
if( obj==this )
return true;
if( obj==null || obj.getClass()!=Buffer.class )
return false;
return equals((Buffer)obj);
}
public boolean equals(Buffer obj) {
return toUnframedBuffer().equals(obj.toUnframedBuffer());
}
public int hashCode() {
if( hashCode==0 ) {
hashCode=2000715872 ^ toUnframedBuffer().hashCode();
}
return hashCode;
}
public boolean frozen() {
return true;
}
}
}