Exemplo n.º 1
0
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)
Exemplo n.º 2
0
class BinaryTree:
    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_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)
Exemplo n.º 3
0
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__')
Exemplo n.º 4
0
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__')
Exemplo n.º 5
0
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)
Exemplo n.º 6
0
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__')
Exemplo n.º 7
0
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__')
Exemplo n.º 8
0
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__')
Exemplo n.º 9
0
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__')
Exemplo n.º 10
0
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__')
Exemplo n.º 11
0
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__')
Exemplo n.º 12
0
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__')
Exemplo n.º 13
0
class Test():
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap, 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__')
Exemplo n.º 14
0
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__')
Exemplo n.º 15
0
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__')
Exemplo n.º 16
0
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__')
Exemplo n.º 17
0
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__')
Exemplo n.º 18
0
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__')
Exemplo n.º 19
0
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__")
Exemplo n.º 20
0
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__')
Exemplo n.º 21
0
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__')
Exemplo n.º 22
0
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__')
Exemplo n.º 23
0
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__')
Exemplo n.º 24
0
class RLock:
    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__')
Exemplo n.º 25
0
class JobManager:
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap)

    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__')
Exemplo n.º 26
0
class RLock:
    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__')
Exemplo n.º 27
0
class BoundedSemaphore:
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap)

    def __concoordinit__(self, count=1):
        return self.proxy.invoke_command('__init__', count)

    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__')
Exemplo n.º 28
0
class Counter:
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap)

    def __concoordinit__(self):
        return self.proxy.invoke_command('__init__')

    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__')
Exemplo n.º 29
0
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__')
Exemplo n.º 30
0
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__')
Exemplo n.º 31
0
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__')
Exemplo n.º 32
0
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__')
Exemplo n.º 33
0
class Counter:
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap)

    def __concoordinit__(self):
        return self.proxy.invoke_command('__init__')

    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__')
Exemplo n.º 34
0
class Bank:
    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 open(self, accntno):
        return self.proxy.invoke_command('open', accntno)

    def close(self, accntno):
        return self.proxy.invoke_command('close', accntno)

    def debit(self, accntno, amount):
        return self.proxy.invoke_command('debit', accntno, amount)

    def deposit(self, accntno, amount):
        return self.proxy.invoke_command('deposit', accntno, amount)

    def balance(self, accntno):
        return self.proxy.invoke_command('balance', accntno)

    def __str__(self):
        return self.proxy.invoke_command('__str__')
Exemplo n.º 35
0
class Bank:
    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 open(self, accntno):
        return self.proxy.invoke_command('open', accntno)

    def close(self, accntno):
        return self.proxy.invoke_command('close', accntno)

    def debit(self, accntno, amount):
        return self.proxy.invoke_command('debit', accntno, amount)

    def deposit(self, accntno, amount):
        return self.proxy.invoke_command('deposit', accntno, amount)

    def balance(self, accntno):
        return self.proxy.invoke_command('balance', accntno)

    def __str__(self):
        return self.proxy.invoke_command('__str__')
Exemplo n.º 36
0
class Bank:
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap)
        
    def __concoordinit__(self):
        return self.proxy.invoke_command('__init__')

    def open(self, accntno):
        return self.proxy.invoke_command('open', accntno)

    def close(self, accntno):
        return self.proxy.invoke_command('close', accntno)

    def debit(self, accntno, amount):
        return self.proxy.invoke_command('debit', accntno, amount)

    def deposit(self, accntno, amount):
        return self.proxy.invoke_command('deposit', accntno, amount)

    def balance(self, accntno):
        return self.proxy.invoke_command('balance', accntno)

    def __str__(self):
        return self.proxy.invoke_command('__str__')
Exemplo n.º 37
0
class Stack:
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap)

    def __concoordinit__(self):
        return self.proxy.invoke_command('__init__')

    def append(self, item):
        return self.proxy.invoke_command('append', item)

    def pop(self):
        return self.proxy.invoke_command('pop')

    def get_size(self):
        return self.proxy.invoke_command('get_size')

    def get_stack(self):
        return self.proxy.invoke_command('get_stack')

    def __str__(self):
        return self.proxy.invoke_command('__str__')
Exemplo n.º 38
0
class Stack:
    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 append(self, item):
        return self.proxy.invoke_command('append', item)

    def pop(self):
        return self.proxy.invoke_command('pop')

    def get_size(self):
        return self.proxy.invoke_command('get_size')

    def get_stack(self):
        return self.proxy.invoke_command('get_stack')

    def __str__(self):
        return self.proxy.invoke_command('__str__')
Exemplo n.º 39
0
class Queue:
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap)

    def __concoordinit__(self):
        return self.proxy.invoke_command('__init__')

    def append(self, item):
        return self.proxy.invoke_command('append', item)

    def remove(self):
        return self.proxy.invoke_command('remove')

    def get_size(self):
        return self.proxy.invoke_command('get_size')

    def get_queue(self):
        return self.proxy.invoke_command('get_queue')

    def __str__(self):
        return self.proxy.invoke_command('__str__')
Exemplo n.º 40
0
class Stack:
    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 append(self, item):
        return self.proxy.invoke_command('append', item)

    def pop(self):
        return self.proxy.invoke_command('pop')

    def get_size(self):
        return self.proxy.invoke_command('get_size')

    def get_stack(self):
        return self.proxy.invoke_command('get_stack')

    def __str__(self):
        return self.proxy.invoke_command('__str__')
Exemplo n.º 41
0
class Queue:
    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 append(self, item):
        return self.proxy.invoke_command('append', item)

    def remove(self):
        return self.proxy.invoke_command('remove')

    def get_size(self):
        return self.proxy.invoke_command('get_size')

    def get_queue(self):
        return self.proxy.invoke_command('get_queue')

    def __str__(self):
        return self.proxy.invoke_command('__str__')
Exemplo n.º 42
0
class Stack:
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap)

    def __concoordinit__(self):
        return self.proxy.invoke_command('__init__')

    def append(self, item):
        return self.proxy.invoke_command('append', item)

    def pop(self):
        return self.proxy.invoke_command('pop')

    def get_size(self):
        return self.proxy.invoke_command('get_size')

    def get_stack(self):
        return self.proxy.invoke_command('get_stack')

    def __str__(self):
        return self.proxy.invoke_command('__str__')
Exemplo n.º 43
0
class Queue:
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap)

    def __concoordinit__(self):
        return self.proxy.invoke_command('__init__')

    def append(self, item):
        return self.proxy.invoke_command('append', item)

    def remove(self):
        return self.proxy.invoke_command('remove')

    def get_size(self):
        return self.proxy.invoke_command('get_size')

    def get_queue(self):
        return self.proxy.invoke_command('get_queue')

    def __str__(self):
        return self.proxy.invoke_command('__str__')
Exemplo n.º 44
0
class MeshMembership():
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap)

    def __concoordinit__(self):
        return self.proxy.invoke_command('__init__')

    def get_group_members(self, gname):
        return self.proxy.invoke_command('get_group_members', gname)

    def get_group_epoch(self, gname):
        return self.proxy.invoke_command('get_group_epoch', gname)

    def get_group_state(self, gname):
        return self.proxy.invoke_command('get_group_state', gname)

    def add_group(self, gname, minsize):
        return self.proxy.invoke_command('add_group', gname, minsize)

    def remove_group(self, gname):
        return self.proxy.invoke_command('remove_group', gname)

    def approve_join(self, gname, node, epochno):
        return self.proxy.invoke_command('approve_join', gname, node, epochno)

    def wait(self, gname):
        return self.proxy.invoke_command('wait', gname)

    def check_member(self, gname, node):
        return self.proxy.invoke_command('check_member', gname, node)

    def notify_failure(self, gname, epoch, failednode):
        return self.proxy.invoke_command('notify_failure', gname, epoch,
                                         failednode)

    def __str__(self):
        return self.proxy.invoke_command('__str__')
Exemplo n.º 45
0
class MeshMembership():
    def __init__(self, bootstrap):
        self.proxy = ClientProxy(bootstrap)

    def __concoordinit__(self):
        return self.proxy.invoke_command('__init__')

    def get_group_members(self, gname):
        return self.proxy.invoke_command('get_group_members', gname)

    def get_group_epoch(self, gname):
        return self.proxy.invoke_command('get_group_epoch', gname)

    def get_group_state(self, gname):
        return self.proxy.invoke_command('get_group_state', gname)
    
    def add_group(self, gname, minsize):
        return self.proxy.invoke_command('add_group', gname, minsize)
        
    def remove_group(self, gname):
        return self.proxy.invoke_command('remove_group', gname)

    def approve_join(self, gname, node, epochno):
        return self.proxy.invoke_command('approve_join', gname, node, epochno)
    
    def wait(self, gname):
        return self.proxy.invoke_command('wait', gname)

    def check_member(self, gname, node):
        return self.proxy.invoke_command('check_member', gname, node)

    def notify_failure(self, gname, epoch, failednode):
        return self.proxy.invoke_command('notify_failure', gname, epoch, failednode)
    
    def __str__(self):
        return self.proxy.invoke_command('__str__')