Current Path : /usr/lib/python2.7/dist-packages/twisted/spread/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/spread/publish.pyc |
ó [³XMc @ s† d Z d d l Z d d l m Z d d l m Z m Z m Z d e j f d „ ƒ YZ d e j f d „ ƒ YZ d „ Z d „ Z d S( s] Persistently cached objects for PB. Maintainer: Glyph Lefkowitz Future Plans: None known. iÿÿÿÿN( t defer( t bananat jellyt flavorst Publishablec B sD e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s; An object whose cached state persists across sessions. c C s | j ƒ | | _ d S( N( t republisht publishedID( t selfR ( ( s: /usr/lib/python2.7/dist-packages/twisted/spread/publish.pyt __init__ s c C s t j ƒ | _ d S( sF Set the timestamp to current and (TODO) update all observers. N( t timet timestamp( R ( ( s: /usr/lib/python2.7/dist-packages/twisted/spread/publish.pyR s c C s | j | ƒ S( s (internal)( t getStateToPublishFor( R t perspective( ( s: /usr/lib/python2.7/dist-packages/twisted/spread/publish.pyt view_getStateToPublish s c C s | j ƒ S( sC Implement me to special-case your state for a perspective. ( t getStateToPublish( R R ( ( s: /usr/lib/python2.7/dist-packages/twisted/spread/publish.pyR # s c C s t d | j ƒ ‚ d S( sK Implement me to return state to copy as part of the publish phase. s %s.getStateToPublishForN( t NotImplementedErrort __class__( R ( ( s: /usr/lib/python2.7/dist-packages/twisted/spread/publish.pyR ( s c C sf | r! | j } | j ƒ j } n d } d } i t j | | ƒ d 6| j d 6| d 6| d 6| j d 6S( s? Get all necessary metadata to keep a clientside cache. t Nonet remoteR R t serviceR ( t perspectiveNamet getServicet serviceNameR t ViewPointR R ( R R t observert pnamet sname( ( s: /usr/lib/python2.7/dist-packages/twisted/spread/publish.pyt getStateToCacheAndObserveFor- s ( t __name__t __module__t __doc__R R R R R R ( ( ( s: /usr/lib/python2.7/dist-packages/twisted/spread/publish.pyR s t RemotePublishedc B sS e Z d Z d Z d Z d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s; The local representation of remote Publishable object. i t pubc C s# d | j | j t | j ƒ | f S( Ns %s-%s-%s.%s( R R t strR ( R t ext( ( s: /usr/lib/python2.7/dist-packages/twisted/spread/publish.pyt getFileNameB s c C sÎ | j j | ƒ g | _ y/ t | j ƒ d ƒ } | j ƒ } | j ƒ Wn t k ra d } n+ Xt j t j | ƒ ƒ } | j | j k } | r® | j | j ƒ d | _ n | j j d ƒ j | j ƒ d S( Nt rbi i R ( t __dict__t updatet _activationListenerst fileR# t readt closet IOErrorR t unjellyR t decodeR t _cbGotUpdatet _wasCleanWhenLoadedR t callRemotet addCallbacks( R t statet dataFilet datat recentt newself( ( s: /usr/lib/python2.7/dist-packages/twisted/spread/publish.pyt setCopyableStateF s c C s6 | j j ƒ } | d =| d =| d =| d =| d =| S( Nt brokerR t luidR' t isActivated( R% t copy( R t other( ( s: /usr/lib/python2.7/dist-packages/twisted/spread/publish.pyt __getstate__X s c C sŒ | j j | ƒ d | _ x | j D] } | | ƒ q# Wg | _ | j ƒ t | j ƒ d ƒ } | j t j t j | ƒ ƒ ƒ | j ƒ d S( Ni t wb( R% R&