
com.taobao.tair.packet.RequestGetGroupPacket Maven / Gradle / Ivy
/**
* (C) 2007-2010 Taobao Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
package com.taobao.tair.packet;
import com.taobao.tair.comm.Transcoder;
import com.taobao.tair.etc.TairConstant;
public class RequestGetGroupPacket extends BasePacket {
private String groupName;
private int configVersion;
public RequestGetGroupPacket(Transcoder transcoder) {
super(transcoder);
this.pcode = TairConstant.TAIR_REQ_GET_GROUP_NEW_PACKET;
}
/**
* encode
*/
public int encode() {
writePacketBegin(0);
// body
byteBuffer.putInt(this.configVersion);
writeString(this.groupName);
writePacketEnd();
return 0;
}
/**
* decode
*/
public boolean decode() {
this.configVersion = byteBuffer.getInt();
this.groupName = readString();
return true;
}
/**
*
* @return the configVersion
*/
public int getConfigVersion() {
return configVersion;
}
/**
*
* @param configVersion the configVersion to set
*/
public void setConfigVersion(int configVersion) {
this.configVersion = configVersion;
}
/**
*
* @return the groupName
*/
public String getGroupName() {
return groupName;
}
/**
*
* @param groupName the groupName to set
*/
public void setGroupName(String groupName) {
this.groupName = groupName;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy