- 论坛徽章:
- 1
|
本帖最后由 q288288 于 2014-12-22 10:56 编辑
- package org.csource.fastdfs;
-
-
- public class StructGroupStat
- extends StructBase
- {
- protected static final int FIELD_INDEX_GROUP_NAME = 0;
-
- protected static final int FIELD_INDEX_FREE_MB = 1;
-
- protected static final int FIELD_INDEX_TRUNK_FREE_MB = 2;
-
- protected static final int FIELD_INDEX_STORAGE_COUNT = 3;
-
- protected static final int FIELD_INDEX_STORAGE_PORT = 4;
-
- protected static final int FIELD_INDEX_STORAGE_HTTP_PORT = 5;
-
- protected static final int FIELD_INDEX_ACTIVE_COUNT = 6;
-
- protected static final int FIELD_INDEX_CURRENT_WRITE_SERVER = 7;
-
- protected static final int FIELD_INDEX_STORE_PATH_COUNT = 8;
-
- protected static final int FIELD_INDEX_SUBDIR_COUNT_PER_PATH = 9;
-
- protected static final int FIELD_INDEX_CURRENT_TRUNK_FILE_ID = 10;
-
- protected static int fieldsTotalSize;
-
- protected static StructBase.FieldInfo[] fieldsArray = new StructBase.FieldInfo[11];
- protected String groupName;
- protected long freeMB;
-
- static { int offset = 0;
- fieldsArray[0] = new StructBase.FieldInfo("groupName", offset, 17);
- offset += 17;
-
- fieldsArray[1] = new StructBase.FieldInfo("freeMB", offset, 8);
- offset += 8;
-
- fieldsArray[2] = new StructBase.FieldInfo("trunkFreeMB", offset, 8);
- offset += 8;
-
- fieldsArray[3] = new StructBase.FieldInfo("storageCount", offset, 8);
- offset += 8;
-
- fieldsArray[4] = new StructBase.FieldInfo("storagePort", offset, 8);
- offset += 8;
-
- fieldsArray[5] = new StructBase.FieldInfo("storageHttpPort", offset, 8);
- offset += 8;
-
- fieldsArray[6] = new StructBase.FieldInfo("activeCount", offset, 8);
- offset += 8;
-
- fieldsArray[7] = new StructBase.FieldInfo("currentWriteServer", offset, 8);
- offset += 8;
-
- fieldsArray[8] = new StructBase.FieldInfo("storePathCount", offset, 8);
- offset += 8;
-
- fieldsArray[9] = new StructBase.FieldInfo("subdirCountPerPath", offset, 8);
- offset += 8;
-
- fieldsArray[10] = new StructBase.FieldInfo("currentTrunkFileId", offset, 8);
- offset += 8;
-
- fieldsTotalSize = offset;
- }
-
-
- protected long trunkFreeMB;
-
- protected int storageCount;
-
- protected int storagePort;
-
- protected int storageHttpPort;
-
- protected int activeCount;
-
- protected int currentWriteServer;
-
- protected int storePathCount;
- protected int subdirCountPerPath;
- protected int currentTrunkFileId;
- public String getGroupName()
- {
- return this.groupName;
- }
-
-
-
-
-
- public long getFreeMB()
- {
- return this.freeMB;
- }
-
-
-
-
-
- public long getTrunkFreeMB()
- {
- return this.trunkFreeMB;
- }
-
-
-
-
-
- public int getStorageCount()
- {
- return this.storageCount;
- }
-
-
-
-
-
- public int getActiveCount()
- {
- return this.activeCount;
- }
-
-
-
-
-
- public int getStoragePort()
- {
- return this.storagePort;
- }
-
-
-
-
-
- public int getStorageHttpPort()
- {
- return this.storageHttpPort;
- }
-
-
-
-
-
- public int getCurrentWriteServer()
- {
- return this.currentWriteServer;
- }
-
-
-
-
-
- public int getStorePathCount()
- {
- return this.storePathCount;
- }
-
-
-
-
-
- public int getSubdirCountPerPath()
- {
- return this.subdirCountPerPath;
- }
-
-
-
-
-
- public int getCurrentTrunkFileId()
- {
- return this.currentTrunkFileId;
- }
-
-
-
-
-
-
- public void setFields(byte[] bs, int offset)
- {
- this.groupName = stringValue(bs, offset, fieldsArray[0]);
- this.freeMB = longValue(bs, offset, fieldsArray[1]);
- this.trunkFreeMB = longValue(bs, offset, fieldsArray[2]);
- this.storageCount = intValue(bs, offset, fieldsArray[3]);
- this.storagePort = intValue(bs, offset, fieldsArray[4]);
- this.storageHttpPort = intValue(bs, offset, fieldsArray[5]);
- this.activeCount = intValue(bs, offset, fieldsArray[6]);
- this.currentWriteServer = intValue(bs, offset, fieldsArray[7]);
- this.storePathCount = intValue(bs, offset, fieldsArray[8]);
- this.subdirCountPerPath = intValue(bs, offset, fieldsArray[9]);
- this.currentTrunkFileId = intValue(bs, offset, fieldsArray[10]);
- }
-
-
-
-
-
- public static int getFieldsTotalSize()
- {
- return fieldsTotalSize;
- }
-
- public StructGroupStat() {}
- }
复制代码 上面是系统自带类,里面的freeMB参数可能对您有用
这是php的FastDFS参数说明你可以参考一下:luhuang.sinaapp.com/fastdfs-fastdfstrackerlistgroups/ |
|