org.csource.fastdfs
类 ClientGlobal

java.lang.Object
  继承者 org.csource.fastdfs.ClientGlobal

public class ClientGlobal
extends Object

Global variables

版本:
Version 1.11
作者:
Happy Fish / YuQing

字段摘要
static String CONF_KEY_CHARSET
           
static String CONF_KEY_CONNECT_TIMEOUT
           
static String CONF_KEY_HTTP_ANTI_STEAL_TOKEN
           
static String CONF_KEY_HTTP_SECRET_KEY
           
static String CONF_KEY_HTTP_TRACKER_HTTP_PORT
           
static String CONF_KEY_NETWORK_TIMEOUT
           
static String CONF_KEY_TRACKER_SERVER
           
static String DEFAULT_CHARSET
           
static int DEFAULT_CONNECT_TIMEOUT
           
static boolean DEFAULT_HTTP_ANTI_STEAL_TOKEN
           
static String DEFAULT_HTTP_SECRET_KEY
           
static int DEFAULT_HTTP_TRACKER_HTTP_PORT
           
static int DEFAULT_NETWORK_TIMEOUT
           
static boolean g_anti_steal_token
           
static String g_charset
           
static int g_connect_timeout
           
static int g_network_timeout
           
static String g_secret_key
           
static TrackerGroup g_tracker_group
           
static int g_tracker_http_port
           
static String PROP_KEY_CHARSET
           
static String PROP_KEY_CONNECT_TIMEOUT_IN_SECONDS
           
static String PROP_KEY_HTTP_ANTI_STEAL_TOKEN
           
static String PROP_KEY_HTTP_SECRET_KEY
           
static String PROP_KEY_HTTP_TRACKER_HTTP_PORT
           
static String PROP_KEY_NETWORK_TIMEOUT_IN_SECONDS
           
static String PROP_KEY_TRACKER_SERVERS
           
 
方法摘要
static String configInfo()
           
static boolean getG_anti_steal_token()
           
static String getG_charset()
           
static int getG_connect_timeout()
           
static int getG_network_timeout()
           
static String getG_secret_key()
           
static TrackerGroup getG_tracker_group()
           
static int getG_tracker_http_port()
           
static Socket getSocket(InetSocketAddress addr)
          construct Socket object
static Socket getSocket(String ip_addr, int port)
          construct Socket object
static void init(String conf_filename)
          load global variables
static void initByProperties(Properties props)
           
static void initByProperties(String propsFilePath)
          load from properties file
static void initByTrackers(InetSocketAddress[] trackerAddresses)
           
static void initByTrackers(String trackerServers)
          load from properties file
static boolean isG_anti_steal_token()
           
static void setG_anti_steal_token(boolean anti_steal_token)
           
static void setG_charset(String charset)
           
static void setG_connect_timeout(int connect_timeout)
           
static void setG_network_timeout(int network_timeout)
           
static void setG_secret_key(String secret_key)
           
static void setG_tracker_group(TrackerGroup tracker_group)
           
static void setG_tracker_http_port(int tracker_http_port)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

CONF_KEY_CONNECT_TIMEOUT

public static final String CONF_KEY_CONNECT_TIMEOUT
另请参见:
常量字段值

CONF_KEY_NETWORK_TIMEOUT

public static final String CONF_KEY_NETWORK_TIMEOUT
另请参见:
常量字段值

CONF_KEY_CHARSET

public static final String CONF_KEY_CHARSET
另请参见:
常量字段值

CONF_KEY_HTTP_ANTI_STEAL_TOKEN

public static final String CONF_KEY_HTTP_ANTI_STEAL_TOKEN
另请参见:
常量字段值

CONF_KEY_HTTP_SECRET_KEY

public static final String CONF_KEY_HTTP_SECRET_KEY
另请参见:
常量字段值

CONF_KEY_HTTP_TRACKER_HTTP_PORT

public static final String CONF_KEY_HTTP_TRACKER_HTTP_PORT
另请参见:
常量字段值

CONF_KEY_TRACKER_SERVER

public static final String CONF_KEY_TRACKER_SERVER
另请参见:
常量字段值

PROP_KEY_CONNECT_TIMEOUT_IN_SECONDS

public static final String PROP_KEY_CONNECT_TIMEOUT_IN_SECONDS
另请参见:
常量字段值

PROP_KEY_NETWORK_TIMEOUT_IN_SECONDS

public static final String PROP_KEY_NETWORK_TIMEOUT_IN_SECONDS
另请参见:
常量字段值

PROP_KEY_CHARSET

public static final String PROP_KEY_CHARSET
另请参见:
常量字段值

PROP_KEY_HTTP_ANTI_STEAL_TOKEN

public static final String PROP_KEY_HTTP_ANTI_STEAL_TOKEN
另请参见:
常量字段值

PROP_KEY_HTTP_SECRET_KEY

public static final String PROP_KEY_HTTP_SECRET_KEY
另请参见:
常量字段值

PROP_KEY_HTTP_TRACKER_HTTP_PORT

public static final String PROP_KEY_HTTP_TRACKER_HTTP_PORT
另请参见:
常量字段值

PROP_KEY_TRACKER_SERVERS

public static final String PROP_KEY_TRACKER_SERVERS
另请参见:
常量字段值

DEFAULT_CONNECT_TIMEOUT

public static final int DEFAULT_CONNECT_TIMEOUT
另请参见:
常量字段值

DEFAULT_NETWORK_TIMEOUT

public static final int DEFAULT_NETWORK_TIMEOUT
另请参见:
常量字段值

DEFAULT_CHARSET

public static final String DEFAULT_CHARSET
另请参见:
常量字段值

DEFAULT_HTTP_ANTI_STEAL_TOKEN

public static final boolean DEFAULT_HTTP_ANTI_STEAL_TOKEN
另请参见:
常量字段值

DEFAULT_HTTP_SECRET_KEY

public static final String DEFAULT_HTTP_SECRET_KEY
另请参见:
常量字段值

DEFAULT_HTTP_TRACKER_HTTP_PORT

public static final int DEFAULT_HTTP_TRACKER_HTTP_PORT
另请参见:
常量字段值

g_connect_timeout

public static int g_connect_timeout

g_network_timeout

public static int g_network_timeout

g_charset

public static String g_charset

g_anti_steal_token

public static boolean g_anti_steal_token

g_secret_key

public static String g_secret_key

g_tracker_http_port

public static int g_tracker_http_port

g_tracker_group

public static TrackerGroup g_tracker_group
方法详细信息

init

public static void init(String conf_filename)
                 throws IOException,
                        MyException
load global variables

参数:
conf_filename - config filename
抛出:
IOException
MyException

initByProperties

public static void initByProperties(String propsFilePath)
                             throws IOException,
                                    MyException
load from properties file

参数:
propsFilePath - properties file path, eg: "fastdfs-client.properties" "config/fastdfs-client.properties" "/opt/fastdfs-client.properties" "C:\\Users\\James\\config\\fastdfs-client.properties" properties文件至少包含一个配置项 fastdfs.tracker_servers 例如: fastdfs.tracker_servers = 10.0.11.245:22122,10.0.11.246:22122 server的IP和端口用冒号':'分隔 server之间用逗号','分隔
抛出:
IOException
MyException

initByProperties

public static void initByProperties(Properties props)
                             throws IOException,
                                    MyException
抛出:
IOException
MyException

initByTrackers

public static void initByTrackers(String trackerServers)
                           throws IOException,
                                  MyException
load from properties file

参数:
trackerServers - 例如:"10.0.11.245:22122,10.0.11.246:22122" server的IP和端口用冒号':'分隔 server之间用逗号','分隔
抛出:
IOException
MyException

initByTrackers

public static void initByTrackers(InetSocketAddress[] trackerAddresses)
                           throws IOException,
                                  MyException
抛出:
IOException
MyException

getSocket

public static Socket getSocket(String ip_addr,
                               int port)
                        throws IOException
construct Socket object

参数:
ip_addr - ip address or hostname
port - port number
返回:
connected Socket object
抛出:
IOException

getSocket

public static Socket getSocket(InetSocketAddress addr)
                        throws IOException
construct Socket object

参数:
addr - InetSocketAddress object, including ip address and port
返回:
connected Socket object
抛出:
IOException

getG_connect_timeout

public static int getG_connect_timeout()

setG_connect_timeout

public static void setG_connect_timeout(int connect_timeout)

getG_network_timeout

public static int getG_network_timeout()

setG_network_timeout

public static void setG_network_timeout(int network_timeout)

getG_charset

public static String getG_charset()

setG_charset

public static void setG_charset(String charset)

getG_tracker_http_port

public static int getG_tracker_http_port()

setG_tracker_http_port

public static void setG_tracker_http_port(int tracker_http_port)

getG_anti_steal_token

public static boolean getG_anti_steal_token()

isG_anti_steal_token

public static boolean isG_anti_steal_token()

setG_anti_steal_token

public static void setG_anti_steal_token(boolean anti_steal_token)

getG_secret_key

public static String getG_secret_key()

setG_secret_key

public static void setG_secret_key(String secret_key)

getG_tracker_group

public static TrackerGroup getG_tracker_group()

setG_tracker_group

public static void setG_tracker_group(TrackerGroup tracker_group)

configInfo

public static String configInfo()


Copyright © 2017. All rights reserved.