public int encode() {
		int capacity = 0;
		List<byte[]> list = new ArrayList<byte[]>();

		for (Object key : keyList) {
			byte[] keyByte = transcoder.encode(key);

			if (keyByte.length >= TairConstant.TAIR_KEY_MAX_LENTH) {
				return 1;
			}

			list.add(keyByte);
			capacity += 40;
			capacity += keyByte.length;
		}

		writePacketBegin(capacity);

		// body
		byteBuffer.put((byte) 0); 
		byteBuffer.putShort(namespace); 
		byteBuffer.putInt(list.size()); // 7
		
		for (byte[] keyByte : list) {
			fillMetas();
			DataEntry.encodeMeta(byteBuffer); // 29
			byteBuffer.putInt(keyByte.length);// 4 
			byteBuffer.put(keyByte); // 33+length
		}
		writePacketEnd();

		return 0;
	}