本文整理汇总了Python中concoord.clientproxy.ClientProxy类的典型用法代码示例。如果您正苦于以下问题:Python ClientProxy类的具体用法?Python ClientProxy怎么用?Python ClientProxy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ClientProxy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
class SimpleConcoordServer:
def __init__(self, bootstrap):
self.proxy = ClientProxy(bootstrap, token='None')
def __concoordinit__(self):
return self.proxy.invoke_command('__concoordinit__')
def test(self):
return self.proxy.invoke_command('test')
def start_server(self, bin_args=None):
return self.proxy.invoke_command('start_server', bin_args)
def kill_server(self):
return self.proxy.invoke_command('kill_server')
def restart_server(self, bin_args=None):
return self.proxy.invoke_command('restart_server', bin_args)
def sc_socket(self, domain, type, protocol):
return self.proxy.invoke_command('sc_socket', domain, type, protocol)
def sc_connect(self, socket_num):
return self.proxy.invoke_command('sc_connect', socket_num)
def sc_send(self, socket_num, data, flags):
return self.proxy.invoke_command('sc_send', socket_num, data, flags)
def sc_recv(self, socket_num, buff_size, flags):
return self.proxy.invoke_command('sc_recv', socket_num, buff_size, flags)
def sc_close(self, socket_num):
return self.proxy.invoke_command('sc_close', socket_num)
示例2: __init__
class BinaryTree:
def __init__(self, bootstrap):
self.proxy = ClientProxy(bootstrap)
def __concoordinit__(self):
return self.proxy.invoke_command('__init__')
def add_node(self, data):
return self.proxy.invoke_command('add_node', data)
def insert(self, root, data):
return self.proxy.invoke_command('insert', root, data)
def find(self, root, target):
return self.proxy.invoke_command('find', root, target)
def delete(self, root, target):
return self.proxy.invoke_command('delete', root, target)
def get_min(self, root):
return self.proxy.invoke_command('get_min', root)
def get_max(self, root):
return self.proxy.invoke_command('get_max', root)
def get_depth(self, root):
return self.proxy.invoke_command('get_depth', root)
def get_size(self, root):
return self.proxy.invoke_command('get_size', root)
示例3: __init__
class NameserverCoord:
def __init__(self, bootstrap, timeout=60, debug=False, token=None):
self.proxy = ClientProxy(bootstrap, timeout, debug, token)
def __concoordinit__(self):
return self.proxy.invoke_command('__init__')
def addnodetosubdomain(self, subdomain, nodetype, node):
return self.proxy.invoke_command('addnodetosubdomain', subdomain, nodetype, node)
def delsubdomain(self, subdomain):
return self.proxy.invoke_command('delsubdomain', subdomain)
def delnodefromsubdomain(self, subdomain, nodetype, node):
return self.proxy.invoke_command('delnodefromsubdomain', subdomain, nodetype, node)
def updatesubdomain(self, subdomain, nodes):
return self.proxy.invoke_command('updatesubdomain', subdomain, nodes)
def getnodes(self, subdomain):
return self.proxy.invoke_command('getnodes', subdomain)
def getsubdomains(self):
return self.proxy.invoke_command('getsubdomains')
def _reinstantiate(self, state):
return self.proxy.invoke_command('_reinstantiate', state)
def __str__(self):
return self.proxy.invoke_command('__str__')
示例4: __init__
class Barrier:
def __init__(self, bootstrap):
self.proxy = ClientProxy(bootstrap)
def __concoordinit__(self, count=1):
return self.proxy.invoke_command('__init__', count)
def wait(self):
return self.proxy.invoke_command('wait')
def __str__(self):
return self.proxy.invoke_command('__str__')
示例5: __init__
class Condition:
def __init__(self, bootstrap):
self.proxy = ClientProxy(bootstrap)
def __concoordinit__(self, lock=None):
return self.proxy.invoke_command('__init__', lock)
def __repr__(self):
return self.proxy.invoke_command('__repr__')
def acquire(self):
return self.proxy.invoke_command('acquire')
def release(self):
return self.proxy.invoke_command('release')
def wait(self):
return self.proxy.invoke_command('wait')
def notify(self):
return self.proxy.invoke_command('notify')
def notifyAll(self):
return self.proxy.invoke_command('notifyAll')
def __str__(self):
return self.proxy.invoke_command('__str__')
示例6: __init__
class Membership:
def __init__(self, bootstrap):
self.proxy = ClientProxy(bootstrap)
def __concoordinit__(self):
return self.proxy.invoke_command('__init__')
def add(self, member):
return self.proxy.invoke_command('add', member)
def remove(self, member):
return self.proxy.invoke_command('remove', member)
def __str__(self):
return self.proxy.invoke_command('__str__')
示例7: __init__
class Test:
def __init__(self, bootstrap):
self.proxy = ClientProxy(bootstrap, debug=True)
def __concoordinit__(self):
return self.proxy.invoke_command('__init__')
def getvalue(self):
return self.proxy.invoke_command('getvalue')
def setvalue(self, newvalue):
return self.proxy.invoke_command('setvalue', newvalue)
def __str__(self):
return self.proxy.invoke_command('__str__')
示例8: Test
class Test():
def __init__(self, bootstrap, timeout=60, debug=False, token=None):
self.proxy = ClientProxy(bootstrap, timeout, debug, token)
def __concoordinit__(self):
return self.proxy.invoke_command('__init__')
def getvalue(self):
return self.proxy.invoke_command('getvalue')
def setvalue(self, newvalue):
return self.proxy.invoke_command('setvalue', newvalue)
def __str__(self):
return self.proxy.invoke_command('__str__')
示例9: __init__
class Membership:
def __init__(self, bootstrap, timeout=60, debug=False, token=None):
self.proxy = ClientProxy(bootstrap, timeout, debug, token)
def __concoordinit__(self):
return self.proxy.invoke_command('__init__')
def add(self, member):
return self.proxy.invoke_command('add', member)
def remove(self, member):
return self.proxy.invoke_command('remove', member)
def __str__(self):
return self.proxy.invoke_command('__str__')
示例10: __init__
class JobManager:
def __init__(self, bootstrap, timeout=60, debug=False, token=None):
self.proxy = ClientProxy(bootstrap, timeout, debug, token)
def __concoordinit__(self):
return self.proxy.invoke_command('__init__')
def add_job(self, job):
return self.proxy.invoke_command('add_job', job)
def remove_job(self, job):
return self.proxy.invoke_command('remove_job', job)
def list_jobs(self):
return self.proxy.invoke_command('list_jobs')
def __str__(self):
return self.proxy.invoke_command('__str__')
示例11: __init__
class Lock:
def __init__(self, bootstrap):
self.proxy = ClientProxy(bootstrap)
def __concoordinit__(self):
return self.proxy.invoke_command("__init__")
def __repr__(self):
return self.proxy.invoke_command("__repr__")
def acquire(self):
return self.proxy.invoke_command("acquire")
def release(self):
return self.proxy.invoke_command("release")
def __str__(self):
return self.proxy.invoke_command("__str__")
示例12: __init__
class Log:
def __init__(self, bootstrap, timeout=60, debug=False, token=None):
self.proxy = ClientProxy(bootstrap, timeout, debug, token)
def __concoordinit__(self):
return self.proxy.invoke_command('__init__')
def write(self, entry):
return self.proxy.invoke_command('write', entry)
def append(self, entry):
return self.proxy.invoke_command('append', entry)
def read(self):
return self.proxy.invoke_command('read')
def __str__(self):
return self.proxy.invoke_command('__str__')
示例13: __init__
class Counter:
def __init__(self, bootstrap, timeout=60, debug=False, token=None):
self.proxy = ClientProxy(bootstrap, timeout, debug, token)
def __concoordinit__(self, value=0):
return self.proxy.invoke_command('__init__', value)
def decrement(self):
return self.proxy.invoke_command('decrement')
def increment(self):
return self.proxy.invoke_command('increment')
def getvalue(self):
return self.proxy.invoke_command('getvalue')
def __str__(self):
return self.proxy.invoke_command('__str__')
示例14: __init__
class Log:
def __init__(self, bootstrap):
self.proxy = ClientProxy(bootstrap)
def __concoordinit__(self):
return self.proxy.invoke_command('__init__')
def write(self, entry):
return self.proxy.invoke_command('write', entry)
def append(self, entry):
return self.proxy.invoke_command('append', entry)
def read(self):
return self.proxy.invoke_command('read')
def __str__(self):
return self.proxy.invoke_command('__str__')
示例15: Value
class Value():
def __init__(self, bootstrap):
self.proxy = ClientProxy(bootstrap, debug=False)
def __concoordinit__(self):
return self.proxy.invoke_command('__init__')
def add_10_percent(self):
return self.proxy.invoke_command('add_10_percent')
def subtract_10000(self):
return self.proxy.invoke_command('subtract_10000')
def get_data(self):
return self.proxy.invoke_command('get_data')
def __str__(self):
return self.proxy.invoke_command('__str__')