public class StorageClient1 extends StorageClient
StorageClient.UploadBuff
Modifier and Type | Field and Description |
---|---|
static String |
SPLIT_GROUP_NAME_AND_FILENAME_SEPERATOR |
base64, errno, storageServer, trackerServer
Constructor and Description |
---|
StorageClient1()
constructor
|
StorageClient1(TrackerServer trackerServer,
StorageServer storageServer)
constructor
|
Modifier and Type | Method and Description |
---|---|
int |
append_file1(String appender_file_id,
byte[] file_buff)
append file to storage server (by file buff)
|
int |
append_file1(String appender_file_id,
byte[] file_buff,
int offset,
int length)
append file to storage server (by file buff)
|
int |
append_file1(String appender_file_id,
long file_size,
UploadCallback callback)
append file to storage server (by callback)
|
int |
append_file1(String appender_file_id,
String local_filename)
append file to storage server (by file name)
|
int |
delete_file1(String file_id)
delete file from storage server
|
byte[] |
download_file1(String file_id)
download file from storage server
|
int |
download_file1(String file_id,
DownloadCallback callback)
download file from storage server
|
byte[] |
download_file1(String file_id,
long file_offset,
long download_bytes)
download file from storage server
|
int |
download_file1(String file_id,
long file_offset,
long download_bytes,
DownloadCallback callback)
download file from storage server
|
int |
download_file1(String file_id,
long file_offset,
long download_bytes,
String local_filename)
download file from storage server
|
int |
download_file1(String file_id,
String local_filename)
download file from storage server
|
FileInfo |
get_file_info1(String file_id)
get file info decoded from filename
|
NameValuePair[] |
get_metadata1(String file_id)
get all metadata items from storage server
|
int |
modify_file1(String appender_file_id,
long file_offset,
byte[] file_buff)
modify appender file to storage server (by file buff)
|
int |
modify_file1(String appender_file_id,
long file_offset,
byte[] file_buff,
int buffer_offset,
int buffer_length)
modify appender file to storage server (by file buff)
|
int |
modify_file1(String appender_file_id,
long file_offset,
long modify_size,
UploadCallback callback)
modify appender file to storage server (by callback)
|
int |
modify_file1(String appender_file_id,
long file_offset,
String local_filename)
modify appender file to storage server (by file name)
|
FileInfo |
query_file_info1(String file_id)
get file info from storage server
|
int |
set_metadata1(String file_id,
NameValuePair[] meta_list,
byte op_flag)
set metadata items to storage server
|
static byte |
split_file_id(String file_id,
String[] results) |
int |
truncate_file1(String appender_file_id)
truncate appender file to size 0 from storage server
|
int |
truncate_file1(String appender_file_id,
long truncated_file_size)
truncate appender file from storage server
|
String |
upload_appender_file1(byte[] file_buff,
String file_ext_name,
NameValuePair[] meta_list)
upload appender file to storage server (by file buff)
|
String |
upload_appender_file1(String group_name,
byte[] file_buff,
String file_ext_name,
NameValuePair[] meta_list)
upload appender file to storage server (by file buff)
|
String |
upload_appender_file1(String group_name,
long file_size,
UploadCallback callback,
String file_ext_name,
NameValuePair[] meta_list)
upload appender file to storage server (by callback)
|
String |
upload_appender_file1(String local_filename,
String file_ext_name,
NameValuePair[] meta_list)
upload appender file to storage server (by file name)
|
String |
upload_appender_file1(String group_name,
String local_filename,
String file_ext_name,
NameValuePair[] meta_list)
upload appender file to storage server (by file name)
|
String |
upload_file1(byte[] file_buff,
String file_ext_name,
NameValuePair[] meta_list)
upload file to storage server (by file buff)
|
String |
upload_file1(String group_name,
byte[] file_buff,
String file_ext_name,
NameValuePair[] meta_list)
upload file to storage server (by file buff)
|
String |
upload_file1(String group_name,
long file_size,
UploadCallback callback,
String file_ext_name,
NameValuePair[] meta_list)
upload file to storage server (by callback)
|
String |
upload_file1(String master_file_id,
String prefix_name,
byte[] file_buff,
int offset,
int length,
String file_ext_name,
NameValuePair[] meta_list)
upload file to storage server (by file buff, slave file mode)
|
String |
upload_file1(String master_file_id,
String prefix_name,
byte[] file_buff,
String file_ext_name,
NameValuePair[] meta_list)
upload file to storage server (by file buff, slave file mode)
|
String |
upload_file1(String master_file_id,
String prefix_name,
long file_size,
UploadCallback callback,
String file_ext_name,
NameValuePair[] meta_list)
upload file to storage server (by callback)
|
String |
upload_file1(String local_filename,
String file_ext_name,
NameValuePair[] meta_list)
upload file to storage server (by file name)
|
String |
upload_file1(String group_name,
String local_filename,
String file_ext_name,
NameValuePair[] meta_list)
upload file to storage server (by file name)
|
String |
upload_file1(String master_file_id,
String prefix_name,
String local_filename,
String file_ext_name,
NameValuePair[] meta_list)
upload file to storage server (by file name, slave file mode)
|
append_file, append_file, append_file, append_file, delete_file, do_append_file, do_modify_file, do_upload_file, download_file, download_file, download_file, download_file, download_file, download_file, get_file_info, get_metadata, getErrorCode, modify_file, modify_file, modify_file, modify_file, newReadableStorageConnection, newUpdatableStorageConnection, newWritableStorageConnection, query_file_info, send_download_package, send_package, set_metadata, truncate_file, truncate_file, upload_appender_file, upload_appender_file, upload_appender_file, upload_appender_file, upload_appender_file, upload_appender_file, upload_appender_file, upload_file, upload_file, upload_file, upload_file, upload_file, upload_file, upload_file, upload_file, upload_file, upload_file, upload_file, upload_file
public static final String SPLIT_GROUP_NAME_AND_FILENAME_SEPERATOR
public StorageClient1()
public StorageClient1(TrackerServer trackerServer, StorageServer storageServer)
trackerServer
- the tracker server, can be nullstorageServer
- the storage server, can be nullpublic String upload_file1(String local_filename, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
local_filename
- local filename to uploadfile_ext_name
- file ext name, do not include dot(.), null to extract ext name from the local filenamemeta_list
- meta info arrayIOException
FsException
public String upload_file1(String group_name, String local_filename, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
group_name
- the group name to upload file to, can be emptylocal_filename
- local filename to uploadfile_ext_name
- file ext name, do not include dot(.), null to extract ext name from the local filenamemeta_list
- meta info arrayIOException
FsException
public String upload_file1(byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
file_buff
- file content/bufffile_ext_name
- file ext name, do not include dot(.)meta_list
- meta info arrayIOException
FsException
public String upload_file1(String group_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
group_name
- the group name to upload file to, can be emptyfile_buff
- file content/bufffile_ext_name
- file ext name, do not include dot(.)meta_list
- meta info arrayIOException
FsException
public String upload_file1(String group_name, long file_size, UploadCallback callback, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
group_name
- the group name to upload file to, can be emptyfile_size
- the file sizecallback
- the write data callback objectfile_ext_name
- file ext name, do not include dot(.)meta_list
- meta info arrayIOException
FsException
public String upload_appender_file1(String local_filename, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
local_filename
- local filename to uploadfile_ext_name
- file ext name, do not include dot(.), null to extract ext name from the local filenamemeta_list
- meta info arrayIOException
FsException
public String upload_appender_file1(String group_name, String local_filename, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
group_name
- the group name to upload file to, can be emptylocal_filename
- local filename to uploadfile_ext_name
- file ext name, do not include dot(.), null to extract ext name from the local filenamemeta_list
- meta info arrayIOException
FsException
public String upload_appender_file1(byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
file_buff
- file content/bufffile_ext_name
- file ext name, do not include dot(.)meta_list
- meta info arrayIOException
FsException
public String upload_appender_file1(String group_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
group_name
- the group name to upload file to, can be emptyfile_buff
- file content/bufffile_ext_name
- file ext name, do not include dot(.)meta_list
- meta info arrayIOException
FsException
public String upload_appender_file1(String group_name, long file_size, UploadCallback callback, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
group_name
- the group name to upload file to, can be emptyfile_size
- the file sizecallback
- the write data callback objectfile_ext_name
- file ext name, do not include dot(.)meta_list
- meta info arrayIOException
FsException
public String upload_file1(String master_file_id, String prefix_name, String local_filename, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
master_file_id
- the master file id to generate the slave fileprefix_name
- the prefix name to generate the slave filelocal_filename
- local filename to uploadfile_ext_name
- file ext name, do not include dot(.), null to extract ext name from the local filenamemeta_list
- meta info arrayIOException
FsException
public String upload_file1(String master_file_id, String prefix_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
master_file_id
- the master file id to generate the slave fileprefix_name
- the prefix name to generate the slave filefile_buff
- file content/bufffile_ext_name
- file ext name, do not include dot(.)meta_list
- meta info arrayIOException
FsException
public String upload_file1(String master_file_id, String prefix_name, byte[] file_buff, int offset, int length, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
master_file_id
- the master file id to generate the slave fileprefix_name
- the prefix name to generate the slave filefile_buff
- file content/bufffile_ext_name
- file ext name, do not include dot(.)meta_list
- meta info arrayIOException
FsException
public String upload_file1(String master_file_id, String prefix_name, long file_size, UploadCallback callback, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException
master_file_id
- the master file id to generate the slave fileprefix_name
- the prefix name to generate the slave filefile_size
- the file sizecallback
- the write data callback objectfile_ext_name
- file ext name, do not include dot(.)meta_list
- meta info arrayIOException
FsException
public int append_file1(String appender_file_id, String local_filename) throws IOException, FsException
appender_file_id
- the appender file idlocal_filename
- local filename to appendIOException
FsException
public int append_file1(String appender_file_id, byte[] file_buff) throws IOException, FsException
appender_file_id
- the appender file idfile_buff
- file content/buffIOException
FsException
public int append_file1(String appender_file_id, byte[] file_buff, int offset, int length) throws IOException, FsException
appender_file_id
- the appender file idfile_buff
- file content/bufferoffset
- start offset of the bufferlength
- the length of the buffer to appendIOException
FsException
public int append_file1(String appender_file_id, long file_size, UploadCallback callback) throws IOException, FsException
appender_file_id
- the appender file idfile_size
- the file sizecallback
- the write data callback objectIOException
FsException
public int modify_file1(String appender_file_id, long file_offset, String local_filename) throws IOException, FsException
appender_file_id
- the appender file idfile_offset
- the offset of appender filelocal_filename
- local filename to appendIOException
FsException
public int modify_file1(String appender_file_id, long file_offset, byte[] file_buff) throws IOException, FsException
appender_file_id
- the appender file idfile_offset
- the offset of appender filefile_buff
- file content/buffIOException
FsException
public int modify_file1(String appender_file_id, long file_offset, byte[] file_buff, int buffer_offset, int buffer_length) throws IOException, FsException
appender_file_id
- the appender file idfile_offset
- the offset of appender filefile_buff
- file content/buffbuffer_offset
- start offset of the buffbuffer_length
- the length of buff to modifyIOException
FsException
public int modify_file1(String appender_file_id, long file_offset, long modify_size, UploadCallback callback) throws IOException, FsException
appender_file_id
- the appender file idfile_offset
- the offset of appender filemodify_size
- the modify sizecallback
- the write data callback objectIOException
FsException
public int delete_file1(String file_id) throws IOException, FsException
file_id
- the file id(including group name and filename)IOException
FsException
public int truncate_file1(String appender_file_id) throws IOException, FsException
appender_file_id
- the appender file idIOException
FsException
public int truncate_file1(String appender_file_id, long truncated_file_size) throws IOException, FsException
appender_file_id
- the appender file idtruncated_file_size
- truncated file sizeIOException
FsException
public byte[] download_file1(String file_id) throws IOException, FsException
file_id
- the file id(including group name and filename)IOException
FsException
public byte[] download_file1(String file_id, long file_offset, long download_bytes) throws IOException, FsException
file_id
- the file id(including group name and filename)file_offset
- the start offset of the filedownload_bytes
- download bytes, 0 for remain bytes from offsetIOException
FsException
public int download_file1(String file_id, String local_filename) throws IOException, FsException
file_id
- the file id(including group name and filename)local_filename
- the filename on localIOException
FsException
public int download_file1(String file_id, long file_offset, long download_bytes, String local_filename) throws IOException, FsException
file_id
- the file id(including group name and filename)file_offset
- the start offset of the filedownload_bytes
- download bytes, 0 for remain bytes from offsetlocal_filename
- the filename on localIOException
FsException
public int download_file1(String file_id, DownloadCallback callback) throws IOException, FsException
file_id
- the file id(including group name and filename)callback
- the callback object, will call callback.recv() when data arriveIOException
FsException
public int download_file1(String file_id, long file_offset, long download_bytes, DownloadCallback callback) throws IOException, FsException
file_id
- the file id(including group name and filename)file_offset
- the start offset of the filedownload_bytes
- download bytes, 0 for remain bytes from offsetcallback
- the callback object, will call callback.recv() when data arriveIOException
FsException
public NameValuePair[] get_metadata1(String file_id) throws IOException, FsException
file_id
- the file id(including group name and filename)IOException
FsException
public int set_metadata1(String file_id, NameValuePair[] meta_list, byte op_flag) throws IOException, FsException
file_id
- the file id(including group name and filename)meta_list
- meta item arrayop_flag
- flag, can be one of following values: IOException
FsException
public FileInfo query_file_info1(String file_id) throws IOException, FsException
file_id
- the file id(including group name and filename)IOException
FsException
public FileInfo get_file_info1(String file_id) throws IOException, FsException
file_id
- the file id(including group name and filename)IOException
FsException
Copyright © 2018 lodsve. All rights reserved.