def __init__ (self, min, max): Object.__init__ (self) self._hashLock= RLock () self._hash= {} self._max= max self._min= min self._full= False
def __init__(self, min, max): Object.__init__(self) self._hashLock = RLock() self._hash = {} self._max = max self._min = min self._full = False
def __init__ (self, url, master=None): Object.__init__ (self) self.debug (1, "Client: %s" % (url)) self._url= URL (url) self._dead= False self._connected= False self._lock= RLock () self._socket= None self._master= master
def __init__(self, url, master=None): Object.__init__(self) self.debug(1, "Client: %s" % (url)) self._url = URL(url) self._dead = False self._connected = False self._lock = RLock() self._socket = None self._master = master
def __init__(self, master, client): Thread.__init__(self) Object.__init__(self) self._dead = False self._master = master # wrap the client (which is a socket()) # in a RequestSocket. self._socket = RequestSocket(client) self._clientName = self._socket.getSockName() self.finished = False self.setName(str(self))
def __init__ (self, master, client): Thread.__init__ (self) Object.__init__ (self) self._dead= False self._master= master # wrap the client (which is a socket()) # in a RequestSocket. self._socket= RequestSocket (client) self._clientName= self._socket.getSockName () self.finished= False self.setName (str (self))
def __init__ (self, master): Object.__init__ (self) self._peersLock= RLock () self._navels= {} self._vices= {} self._virtues= {} self.__proto= { 'umbie': self._navels, 'vice': self._vices, 'virtue': self._virtues, } self._master= master
def __init__ (self, port, master): Thread.__init__ (self) Object.__init__ (self) self._master= master self._socket= socket (AF_INET, SOCK_STREAM) self._socket.setsockopt (SOL_SOCKET, SO_LINGER, pack ("ii", 1, 0)) # sorry, but *nothing* should be done before the Thread.__init__ (???) # Thread.__init__ (self, "ServerLoop in %d" % self._socket.fileno ()) # '' means INADDR_ANY self._socket.bind (('', port)) self._socket.listen (10) self.debug (1, 'ServerLoop created')
def __init__(self, port, master): Thread.__init__(self) Object.__init__(self) self._master = master self._socket = socket(AF_INET, SOCK_STREAM) self._socket.setsockopt(SOL_SOCKET, SO_LINGER, pack("ii", 1, 0)) # sorry, but *nothing* should be done before the Thread.__init__ (???) # Thread.__init__ (self, "ServerLoop in %d" % self._socket.fileno ()) # '' means INADDR_ANY self._socket.bind(('', port)) self._socket.listen(10) self.debug(1, 'ServerLoop created')
def __init__ (self, ino, master, parent=None, vice=None, policy=None): """ mb only a ring is needed """ Object.__init__ (self) self.policy= policy self.ino= ino self.master= master self._vice= vice if not parent: self.parent= self else: self.parent= parent
def __init__(self, ino, master, parent=None, vice=None, policy=None): """ mb only a ring is needed """ Object.__init__(self) self.policy = policy self.ino = ino self.master = master self._vice = vice if not parent: self.parent = self else: self.parent = parent
def __init__ (self, sock=None, **options): Object.__init__ (self) if sock: self._socket= sock else: self._socket= socket (AF_INET, SOCK_STREAM) self._socket.setsockopt (IPPROTO_TCP, TCP_NODELAY, True) # set extra options as passed for option in options.keys(): self.debug (1, 'setting option %d' % option) self._socket.setsockopt (option, options[option]) self.debug (1, 'created ReqSock [%d, %s]' % (self.fileno (), str(self.getSockName()[1]))) self._connected= False
def __init__ (self, url=None): Object.__init__ (self) self._proto= None self._host= None self._port= None # [a-zA-z0-9\-] self._match= re.compile ('(\w+)://([\w|\.|-]+):(\d+)/') if url: if not isinstance (url, URL): self.parse (url) else: self._proto= url.proto () self._host= url.host () self._port= url.port ()
def __init__(self, url=None): Object.__init__(self) self._proto = None self._host = None self._port = None # [a-zA-z0-9\-] self._match = re.compile('(\w+)://([\w|\.|-]+):(\d+)/') if url: if not isinstance(url, URL): self.parse(url) else: self._proto = url.proto() self._host = url.host() self._port = url.port()
def __init__(self, master, path): Object.__init__(self) self.master = master dir = dirname(path) try: stat(dir) except OSError: makedirs(dir) self.path = path self.data = None self.meta = None self.locks = None self.mkDB() # master lock. global actions (like sync and emp) must acquire this one. self.masterLock = RLock()
def __init__ (self, master, path): Object.__init__ (self) self.master= master dir= dirname (path) try: stat (dir) except OSError: makedirs (dir) self.path= path self.data= None self.meta= None self.locks= None self.mkDB () # master lock. global actions (like sync and emp) must acquire this one. self.masterLock= RLock ()
def __init__(self, master, url, key): Object.__init__(self) self._key = key # stores the Server to where this peer # (the remote one that this object represents) # is connected self._server = None # and this stores the Client self._client = None self._master = master self.debug(1, "Stub: %s" % (url)) self._url = url self._key = key self._kind = None # I can build a client, because I have the data, # it does not connect till it's needed, # and because I wanna :) self.createEmptyClient()
def __init__ (self, master, url, key): Object.__init__ (self) self._key= key # stores the Server to where this peer # (the remote one that this object represents) # is connected self._server= None # and this stores the Client self._client= None self._master= master self.debug (1, "Stub: %s" % (url)) self._url= url self._key= key self._kind= None # I can build a client, because I have the data, # it does not connect till it's needed, # and because I wanna :) self.createEmptyClient ()
def __init__ (self, url=None, key=None, column=None, fileName=None): Object.__init__ (self, fileName=fileName, compressed=False) self.debug (1, 'm: logging in %s' % fileName) self._key= key self._url= None self._loop= None self._peers= PeerList (self) self._terminate= False # the class of the individual servers. self._serverType= None self._ring= Ring (self) self._data= None self._timeout= None # gotta join the clients after our servers died # so I keep a list and join them in the periodic function self._threadsToJoin= [] if url: self.setUrl (url)
def __init__ (self, navel): Thread.__init__ (self) Object.__init__ (self) self.socket= socket (AF_INET, SOCK_DGRAM) self.socket.bind (('', consts.chalPort)) self.navel= navel
def __init__(self): Object.__init__(self)
def __init__ (self, master): Object.__init__ (self) self.master= master self.peers= master._peers
def __init__ (self): Object.__init__ (self)
def __init__(self, master): Object.__init__(self) self.master = master self.peers = master._peers