|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectorg.csource.fastdfs.TrackerClient
public class TrackerClient
Tracker client
字段摘要 | |
---|---|
protected byte |
errno
|
protected TrackerGroup |
tracker_group
|
构造方法摘要 | |
---|---|
TrackerClient()
constructor with global tracker group |
|
TrackerClient(TrackerGroup tracker_group)
constructor with specified tracker group |
方法摘要 | |
---|---|
boolean |
deleteStorage(String groupName,
String storageIpAddr)
delete a storage server from the global FastDFS cluster |
boolean |
deleteStorage(TrackerGroup trackerGroup,
String groupName,
String storageIpAddr)
delete a storage server from the FastDFS cluster |
TrackerServer |
getConnection()
get a connection to tracker server |
byte |
getErrorCode()
get the error code of last call |
StorageServer |
getFetchStorage(TrackerServer trackerServer,
String groupName,
String filename)
query storage server to download file |
StorageServer |
getFetchStorage1(TrackerServer trackerServer,
String file_id)
query storage server to download file |
ServerInfo[] |
getFetchStorages(TrackerServer trackerServer,
String groupName,
String filename)
get storage servers to download file |
ServerInfo[] |
getFetchStorages1(TrackerServer trackerServer,
String file_id)
get storage servers to download file |
protected ServerInfo[] |
getStorages(TrackerServer trackerServer,
byte cmd,
String groupName,
String filename)
query storage server to download file |
StorageServer |
getStoreStorage(TrackerServer trackerServer)
query storage server to upload file |
StorageServer |
getStoreStorage(TrackerServer trackerServer,
String groupName)
query storage server to upload file |
StorageServer[] |
getStoreStorages(TrackerServer trackerServer,
String groupName)
query storage servers to upload file |
StorageServer |
getUpdateStorage(TrackerServer trackerServer,
String groupName,
String filename)
query storage server to update file (delete file or set meta data) |
StructGroupStat[] |
listGroups(TrackerServer trackerServer)
list groups |
StructStorageStat[] |
listStorages(TrackerServer trackerServer,
String groupName)
query storage server stat info of the group |
StructStorageStat[] |
listStorages(TrackerServer trackerServer,
String groupName,
String storageIpAddr)
query storage server stat info of the group |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
protected TrackerGroup tracker_group
protected byte errno
构造方法详细信息 |
---|
public TrackerClient()
public TrackerClient(TrackerGroup tracker_group)
tracker_group
- the tracker group object方法详细信息 |
---|
public byte getErrorCode()
public TrackerServer getConnection() throws IOException
IOException
public StorageServer getStoreStorage(TrackerServer trackerServer) throws IOException
trackerServer
- the tracker server
IOException
public StorageServer getStoreStorage(TrackerServer trackerServer, String groupName) throws IOException
trackerServer
- the tracker servergroupName
- the group name to upload file to, can be empty
IOException
public StorageServer[] getStoreStorages(TrackerServer trackerServer, String groupName) throws IOException
trackerServer
- the tracker servergroupName
- the group name to upload file to, can be empty
IOException
public StorageServer getFetchStorage(TrackerServer trackerServer, String groupName, String filename) throws IOException
trackerServer
- the tracker servergroupName
- the group name of storage serverfilename
- filename on storage server
IOException
public StorageServer getUpdateStorage(TrackerServer trackerServer, String groupName, String filename) throws IOException
trackerServer
- the tracker servergroupName
- the group name of storage serverfilename
- filename on storage server
IOException
public ServerInfo[] getFetchStorages(TrackerServer trackerServer, String groupName, String filename) throws IOException
trackerServer
- the tracker servergroupName
- the group name of storage serverfilename
- filename on storage server
IOException
protected ServerInfo[] getStorages(TrackerServer trackerServer, byte cmd, String groupName, String filename) throws IOException
trackerServer
- the tracker servercmd
- command code, ProtoCommon.TRACKER_PROTO_CMD_SERVICE_QUERY_FETCH_ONE or
ProtoCommon.TRACKER_PROTO_CMD_SERVICE_QUERY_UPDATEgroupName
- the group name of storage serverfilename
- filename on storage server
IOException
public StorageServer getFetchStorage1(TrackerServer trackerServer, String file_id) throws IOException
trackerServer
- the tracker serverfile_id
- the file id(including group name and filename)
IOException
public ServerInfo[] getFetchStorages1(TrackerServer trackerServer, String file_id) throws IOException
trackerServer
- the tracker serverfile_id
- the file id(including group name and filename)
IOException
public StructGroupStat[] listGroups(TrackerServer trackerServer) throws IOException
trackerServer
- the tracker server
IOException
public StructStorageStat[] listStorages(TrackerServer trackerServer, String groupName) throws IOException
trackerServer
- the tracker servergroupName
- the group name of storage server
IOException
public StructStorageStat[] listStorages(TrackerServer trackerServer, String groupName, String storageIpAddr) throws IOException
trackerServer
- the tracker servergroupName
- the group name of storage serverstorageIpAddr
- the storage server ip address, can be null or empty
IOException
public boolean deleteStorage(String groupName, String storageIpAddr) throws IOException
groupName
- the group name of storage serverstorageIpAddr
- the storage server ip address
IOException
public boolean deleteStorage(TrackerGroup trackerGroup, String groupName, String storageIpAddr) throws IOException
trackerGroup
- the tracker server groupgroupName
- the group name of storage serverstorageIpAddr
- the storage server ip address
IOException
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |