def async_findObjectById4All(self, callback, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) self.tars_invoke_async(ServantProxy.TARSNORMAL, "findObjectById4All", oos.getBuffer(), context, None, callback)
def findObjectById(self, id, context = ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream(); oos.write(tarscore.string, 1, id); rsp = self.tars_invoke(ServantProxy.TARSNORMAL, "findObjectById", oos.getBuffer(), context, None); ios = tarscore.TarsInputStream(rsp.sBuffer); ret = ios.read(tarscore.vctclass(EndpointF), 0, True); return (ret);
def findObjectByIdInSameSet(self, id, setId, context = ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream(); oos.write(tarscore.string, 1, id); oos.write(tarscore.string, 2, setId); rsp = self.tars_invoke(ServantProxy.TARSNORMAL, "findObjectByIdInSameSet", oos.getBuffer(), context, None); ios = tarscore.TarsInputStream(rsp.sBuffer); ret = ios.read(tarscore.int32, 0, True); activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True); inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True); return (ret, activeEp, inactiveEp);
def findObjectById4All(self, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) rsp = self.tars_invoke(ServantProxy.TARSNORMAL, "findObjectById4All", oos.getBuffer(), context, None) ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True) return (ret, activeEp, inactiveEp)
def findObjectByIdInSameGroup(self, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) rsp = self.tars_invoke(ServantProxy.TARSNORMAL, "findObjectByIdInSameGroup", oos.getBuffer(), context, None) startDecodeTime = time.time() ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True) endDecodeTime = time.time() return (ret, activeEp, inactiveEp, (endDecodeTime - startDecodeTime))
def async_findObjectByIdInSameSet(self, callback, id, setId, context = ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream(); oos.write(tarscore.string, 1, id); oos.write(tarscore.string, 2, setId); rsp = self.tars_invoke_async(ServantProxy.TARSNORMAL, "findObjectByIdInSameSet", oos.getBuffer(), context, None, callback);