"""Do distributed reference counting on finalize. """ try: # log.msg( ' --- decache: %s %s' % (self, self.luid) ) if self.broker: self.broker.decCacheRef(self.luid) except: log.deferr() def unjellyCached(unjellier, unjellyList): luid = unjellyList[1] cNotProxy = unjellier.invoker.cachedLocallyAs(luid) cProxy = _newDummyLike(cNotProxy) return cProxy setUnjellyableForClass("cached", unjellyCached) def unjellyLCache(unjellier, unjellyList): luid = unjellyList[1] obj = unjellier.invoker.remotelyCachedForLUID(luid) return obj setUnjellyableForClass("lcache", unjellyLCache) def unjellyLocal(unjellier, unjellyList): obj = unjellier.invoker.localObjectForID(unjellyList[1]) return obj setUnjellyableForClass("local", unjellyLocal) class RemoteCacheMethod:
# log.msg( ' --- decache: %s %s' % (self, self.luid) ) if self.broker: self.broker.decCacheRef(self.luid) except: log.deferr() def unjellyCached(unjellier, unjellyList): luid = unjellyList[1] cNotProxy = unjellier.invoker.cachedLocallyAs(luid) cProxy = _Dummy() cProxy.__class__ = cNotProxy.__class__ cProxy.__dict__ = cNotProxy.__dict__ return cProxy setUnjellyableForClass("cached", unjellyCached) def unjellyLCache(unjellier, unjellyList): luid = unjellyList[1] obj = unjellier.invoker.remotelyCachedForLUID(luid) return obj setUnjellyableForClass("lcache", unjellyLCache) def unjellyLocal(unjellier, unjellyList): obj = unjellier.invoker.localObjectForID(unjellyList[1]) return obj setUnjellyableForClass("local", unjellyLocal) class RemoteCacheMethod: