Exemple #1
0
 def __init__(self, name, pk, timeout=TIMEOUT, **kw):
     MemObject.__init__(self, name, mclient)
     self._pk = pk
     self._fk = kw.get('fk', '')
     self._incrkey = kw.get('incrkey', '')
     self._incrvalue = kw.get('incrvalue', 0)
     self._timeout = timeout
Exemple #2
0
 def __init__(self, name,pk,data={},fk=None,**kw):
     """
     """
     MemObject.__init__(self, name,**kw)
     self._pk = pk
     self._fk = fk
     self.data = data
Exemple #3
0
 def __init__(self, name, pk, data={}, fk=None, **kw):
     """
     """
     MemObject.__init__(self, name, **kw)
     self._pk = pk
     self._fk = fk
     self.data = data
Exemple #4
0
 def __init__(self, name, pk, timeout=TIMEOUT, **kw):
     MemObject.__init__(self, name, mclient)
     self._pk = pk
     self._fk = kw.get('fk', '')
     self._incrkey = kw.get('incrkey', '')  # 当数据库主键为自增时,这里传入值为Id,自动补充id
     self._incrvalue = kw.get('incrvalue', 0)  # 为0时Id自增
     self._timeout = timeout
Exemple #5
0
 def __init__(self, name,pk,timeout=TIMEOUT,**kw):
     MemObject.__init__(self, name, mclient)
     self._pk = pk
     self._fk = kw.get('fk','')
     self._incrkey = kw.get('incrkey','')
     self._incrvalue = kw.get('incrvalue',0)
     self._timeout = timeout
Exemple #6
0
 def __init__(self, name,pk,data={}):
     """
     """
     MemObject.__init__(self, name, mclient)
     self._state = MMODE_STATE_ORI#对象的状态 0未变更  1新建 2更新 3删除
     self._pk = pk
     self.data = data
     self._time = time.time()
Exemple #7
0
 def __init__(self, name, pk, data={}):
     """
     """
     MemObject.__init__(self, name, mclient)
     self._state = MMODE_STATE_ORI  #对象的状态 0未变更  1新建 2更新 3删除
     self._pk = pk
     self.data = data
     self._time = time.time()
Exemple #8
0
    def __init__(self, pid, name, mc):
        """

        """
        MemObject.__init__(self, name, mc)
        self.id = pid
        self.level = 0
        self.profession = 0
        self.nickname = u""
        self.guanqia = 1000
Exemple #9
0
    def __init__(self,pid,name,mc):
        """

        """
        MemObject.__init__(self, name, mc)
        self.id = pid
        self.level = 0
        self.profession = 0
        self.nickname = u''
        self.guanqia = 1000
Exemple #10
0
 def __init__(self,pid,name,mc):
     """初始化城镇要塞对象
     @param territoryId: int 领地的ID
     @param guard: int 殖民者的ID
     @param guardname: str 殖民者的名称
     @param updateTime: int 领地被更新的时间
     """
     MemObject.__init__(self, name, mc)
     self.id = pid
     self.level = 0
     self.profession = 0
     self.nickname = u''
     self.guanqia = 1000
Exemple #11
0
 def __init__(self, pid, name, mc):
     """初始化城镇要塞对象
     @param territoryId: int 领地的ID
     @param guard: int 殖民者的ID
     @param guardname: str 殖民者的名称
     @param updateTime: int 领地被更新的时间
     """
     MemObject.__init__(self, name, mc)
     self.id = pid
     self.level = 0
     self.profession = 0
     self.nickname = u''
     self.guanqia = 1000
Exemple #12
0
 def __init__(self, name,pklist = []):
     MemObject.__init__(self, name, mclient)
     self.pklist = pklist
Exemple #13
0
 def __init__(self, name, pklist=None):
     MemObject.__init__(self, name, mclient)
     if pklist is None:
         self.pklist = []
     else:
         self.pklist = pklist
Exemple #14
0
 def __init__(self, mAdmin, pk, data={}):
     MemObject.__init__(self, mAdmin.getName() + ':%s' % pk, timeout=mAdmin.timeout)
     self._mAdmin = mAdmin
     self._pk = pk
     self.data = data
Exemple #15
0
 def __init__(self, name, pk, data={}):
     MemObject.__init__(self, name, mclient)
     self._state = 0  #对象的状态 0未变更  1新建 2更新 3删除
     self._pk = pk
     self.data = data
     self._time = time.time()
Exemple #16
0
 def __init__(self, name,pk,data={}):
     MemObject.__init__(self, name, mclient)
     self._state = 0#对象的状态 0未变更  1新建 2更新 3删除
     self._pk = pk
     self.data = data
     self._time = time.time()
Exemple #17
0
 def __init__(self, name, pklist=[]):
     MemObject.__init__(self, name, mclient)
     self.pklist = pklist