Exemplo n.º 1
0
 protected static function _getSchema()
 {
     if (!self::$schema instanceof Ak_Schema) {
         $def = array('mc_expire' => array('base' => 'int', 'min' => 0, 'default' => 0), 'zk_expire' => array('base' => 'int', 'min' => 1, 'default' => 60), 'bool_true' => array('base' => 'bool', 'default' => true), 'bool_false' => array('base' => 'bool', 'default' => false), 'zk_host' => array('base' => 'string', 'optional' => true), 'ctimeoutopt' => array('base' => 'int', 'max' => 1000, 'optional' => true), 'ptimeoutopt' => array('base' => 'int', 'max' => 1000, 'optional' => true), 'wtimeoutopt' => array('base' => 'int', 'max' => 5000, 'optional' => true), 'rtimeoutopt' => array('base' => 'int', 'max' => 5000, 'optional' => true), 'backfill_key_count' => array('base' => 'int', 'default' => 0), 'ctimeoutdef' => array('base' => 'int', 'max' => 1000, 'default' => 20), 'ptimeoutdef' => array('base' => 'int', 'max' => 1000, 'default' => 20), 'wtimeoutdef' => array('base' => 'int', 'max' => 5000, 'default' => 100), 'rtimeoutdef' => array('base' => 'int', 'max' => 5000, 'default' => 500), 'acm_ctimeout' => array('base' => 'int', 'max' => 10000, 'default' => 20), 'acm_rtimeout' => array('base' => 'int', 'max' => 10000, 'default' => 500), 'acm_wtimeout' => array('base' => 'int', 'max' => 10000, 'default' => 100), 'strategy_index' => array('base' => 'int', 'default' => 0), 'mc_conf' => array('base' => 'object', 'members' => array('pid' => 'string', 'zk_host' => 'zk_host', 'zk_path' => 'string', 'zk_expire' => 'zk_expire', 'default_expire' => 'mc_expire', 'span_idc_strategy_index' => 'strategy_index', 'delete_directly' => 'bool_true', 'delete_delay' => 'bool_true', 'log_failed_server' => 'bool_false', 'connect_timeout' => 'ctimeoutopt', 'poll_timeout' => 'ptimeoutopt', 'send_timeout' => 'wtimeoutopt', 'recv_timeout' => 'rtimeoutopt', 'acm_connect_timeout' => 'acm_ctimeout', 'acm_read_timeout' => 'acm_rtimeout', 'acm_write_timeout' => 'acm_wtimeout')), 'idc_type' => array('base' => 'string', 'in' => array('none', 'self', 'all')), 'server' => array('base' => 'object', 'members' => array('ip' => 'string', 'port' => 'int'), 'alias' => array('Port' => 'port', 'host' => 'ip')), 'servers' => array('base' => 'dict', 'key_type' => 'string', 'value_type' => 'server'), 'servers_omit_key_type' => array('base' => 'dict', 'key_type' => 'any', 'value_type' => 'server', 'min_size' => 1), 'server_list' => array('base' => 'object', 'members' => array('idc' => 'string', 'children' => 'servers')), 'server_lists' => array('base' => 'dict', 'key_type' => 'string', 'value_type' => 'server_list'), 'zk_conf' => array('base' => 'object', 'members' => array('delete_cmd' => 'int', 'idc_type' => 'idc_type', 'idc_num' => 'int', 'connect_timeout' => 'ctimeoutopt', 'poll_timeout' => 'ptimeoutopt', 'send_timeout' => 'wtimeoutopt', 'recv_timeout' => 'rtimeoutopt', 'max_backfill_key_count' => 'backfill_key_count', 'children' => 'server_lists')), 'zk_global_conf' => array('base' => 'object', 'members' => array('connect_timeout' => 'ctimeoutdef', 'poll_timeout' => 'ptimeoutdef', 'send_timeout' => 'wtimeoutdef', 'recv_timeout' => 'rtimeoutdef')), 'idcs_type' => array('base' => 'dict', 'key_type' => 'int', 'value_type' => 'string', 'min_size' => 1), 'idcs_list' => array('base' => 'dict', 'key_type' => 'int', 'value_type' => 'idcs_type', 'min_size' => 1), 'idc_strategy' => array('base' => 'dict', 'key_type' => 'string', 'value_type' => 'idcs_list', 'min_size' => 1), 'idc_strategy_array' => array('base' => 'dict', 'key_type' => 'int', 'value_type' => 'idc_strategy', 'min_size' => 1), 'idc_strategy_conf' => array('base' => 'object', 'members' => array('span_idc_strategy' => 'idc_strategy_array')), 'acm_idc_num' => array('base' => 'int', 'min' => 1, 'default' => 1), 'acm_server_list' => array('base' => 'dict', 'key_type' => 'string', 'value_type' => 'server', 'min_size' => 1), 'acm_service' => array('base' => 'object', 'members' => array('idc' => 'string', 'children' => 'acm_server_list')), 'acm_service_list' => array('base' => 'dict', 'key_type' => 'string', 'value_type' => 'acm_service', 'min_size' => 1), 'acm_conf' => array('base' => 'object', 'members' => array('acm_idc_num' => 'int', 'children' => 'acm_service_list')));
         self::$schema = Ak_Schema::create($def);
     }
     return self::$schema;
 }
Exemplo n.º 2
0
 protected static function _getSchema()
 {
     if (!self::$schema instanceof Ak_Schema) {
         $def = array('ctimeout' => array('base' => 'int', 'optional' => true), 'wtimeout' => array('base' => 'int', 'optional' => true), 'rtimeout' => array('base' => 'int', 'optional' => true), 'retry' => array('base' => 'int', 'optional' => true), 'timeoutconf' => array('base' => 'object', 'optional' => true, 'members' => array('ConnectTimeOut' => 'ctimeout', 'WriteTimeOut' => 'wtimeout', 'ReadTimeOut' => 'rtimeout')), 'aclient_conf' => array('base' => 'object', 'members' => array('Source' => 'string', 'Protocol' => 'string', 'Scheduler' => 'string', 'HttpConf' => 'timeoutconf', 'NsheadConf' => 'timeoutconf')));
         self::$schema = Ak_Schema::create($def);
     }
     return self::$schema;
 }
Exemplo n.º 3
0
 protected static function _getSchema()
 {
     if (!self::$schema instanceof Ak_Schema) {
         $def = array('server' => array('base' => 'object', 'members' => array('ip' => 'string', 'port' => 'int'), 'alias' => array('Port' => 'port')), 'servers' => array('base' => 'dict', 'min_size' => 1, 'key_type' => 'string', 'value_type' => 'server'), 'converter' => array('base' => 'object', 'members' => array('name' => 'string')), 'protocol' => array('base' => 'object', 'members' => array('name' => 'string')), 'retry' => array('base' => 'int', 'default' => 0), 'service' => array('base' => 'object', 'members' => array('converter' => 'converter', 'protocol' => 'protocol', 'ConnectTimeOut' => 'int', 'service_name' => 'string', 'service_port' => 'int', 'service_retry' => 'retry', 'ReadTimeOut' => 'int', 'WriteTimeOut' => 'int', 'ServiceRetry' => 'retry'), 'alias' => array('service_ctimeout' => 'ConnectTimeOut', 'service_rtimeout' => 'ReadTimeOut', 'service_wtimeout' => 'WriteTimeOut', 'service_retry' => 'ServiceRetry')), 'services' => array('base' => 'dict', 'key_type' => 'string', 'value_type' => 'service'), 'server_list' => array('base' => 'object', 'members' => array('children' => 'servers', 'name' => 'string', 'services' => 'services')));
         self::$schema = Ak_Schema::create($def);
     }
     return self::$schema;
 }