-
Ec       s     d  Z    d k Z  d k Z  d k l Z 	 d k l Z 
 d k l Z  d k l	 Z	  d f  d     YZ
  d f  d	     YZ d S(
   s   
N(   s   CORBA(   s   getNamePath(   s	   DataStore(   s   DataStoreSessions   InterfaceImplc      s     d   Z   e d  Z  e d  Z " e d  Z T d   Z r d   Z  d   Z  d   Z  d	 d
  Z	  d   Z
  d   Z RS(   Nc    s/     t    |  _  d |  _  |  i   d  S(   Ni    (   s   _SessionManagers   selfs   _sessionManagers   _cachingEnableds
   clearCache(   s   self(    (    s   DataStoreInterfaceImpl.pys   __init__ s   c    s2     |  i | |  \ } } }  | | f Sd  S(   N(   s   selfs   internalGets   keyss   cachingEnableds   rcs   valuess   notfound(   s   selfs   keyss   cachingEnableds   notfounds   valuess   rc(    (    s   DataStoreInterfaceImpl.pys   get s   c    sB     |  i | |  \ } } }  | i |    | | f Sd  S(   N(   s   selfs   internalGets   keyss   cachingEnableds   rcs   valuess   notfounds   update(   s   selfs   keyss   cachingEnableds   notfounds   valuess   rc(    (    s   DataStoreInterfaceImpl.pys   getAll s   c    s  " # $ h  } % d } ( | t j o ) |  i } n , g  } - g  } . xK | D. ]@ }
 / |  i
 i |
  o 0 | i |
  n 2 | i |
  qT W5 t |  } 6 | d j o; 7 |  i |  \ } } 8 | o 9 d h  | f Sn n < h  }	 ? x% | D? ] }
 @ |  i
 |
 |	 |
 <qWD x t |  DD ]u } E | | } G | i oH H | | }
 I | i } J | |	 |
 <L | o M | |  i
 |
 <n n O t | |
 <q9WQ | |	 | f Sd S(   s1   Internal get implementation for get/getAll to usei   i    N(   s   notfounds   rcs   cachingEnableds   Nones   selfs   _cachingEnableds   cacheds   uncacheds   keyss   keys   _caches   has_keys   appends   lens   numUncacheds   _gets   valuess   results   ranges   is   values   valids   data(   s   selfs   keyss   cachingEnableds   notfounds   is   datas   uncacheds   cacheds   valuess   results   keys   rcs   numUncacheds   value(    (    s   DataStoreInterfaceImpl.pys   internalGet" s@   				
 		
 	 	
c 
   s2  T U d } X g  } Y xB | DY ]7 \ } } } Z t i | | |  }	 [ | i	 |	  q W] yY ^ |  i i   } _ | i |  c x- | Dc ]" \ } } } d |  i i	 |  q WWnk f t i j
 o } g d } h d GHnA j t i j
 o. } k d } l |  i i   m d G| GHn Xo | Sd  S(   Ni   i    s4   max. transaction size exceeded; DataStore set faileds   CORBA.SystemException(   s   rcs	   dsEntriess   entriess   keys   datas   expirs   DataStoreSessions   Entrys   dsEntrys   appends   selfs   _sessionManagers   getDataStoreSessions   sessions   sets   _invalids   TransactionSizeExceededs   es   CORBAs   SystemExceptions   resetSession(
   s   selfs   entriess	   dsEntriess   es   sessions   expirs   keys   rcs   datas   dsEntry(    (    s   DataStoreInterfaceImpl.pys   setT s(   		
 
 		c    s   r s d } u yP v |  i i   } w | i |  { x$ | D{ ] } | |  i i	 |  q> WWnk ~ t
 i j
 o }  d }  d GHnA  t i j
 o. }  d }  |  i i    d G| GHn X | Sd  S(   Ni   i    s7   max. transaction size exceeded; DataStore remove faileds   CORBA.SystemException(   s   rcs   selfs   _sessionManagers   getDataStoreSessions   sessions   removes   keyss   keys   _invalids   appends   DataStoreSessions   TransactionSizeExceededs   es   CORBAs   SystemExceptions   resetSession(   s   selfs   keyss   sessions   es   keys   rc(    (    s   DataStoreInterfaceImpl.pys   remover s   	
 			c    s     d }  yp  |  i i   }  | i    x; |  i D ]- }  |  i i	 |  o  |  i | =n q> W g  |  _ Wn@  t
 i j
 o. }  d }  |  i i    d G| GHn X | Sd  S(   Ni   i    s   CORBA.SystemException(   s   rcs   selfs   _sessionManagers   getDataStoreSessions   sessions   commits   _invalids   keys   _caches   has_keys   CORBAs   SystemExceptions   es   resetSession(   s   selfs   sessions   es   keys   rc(    (    s   DataStoreInterfaceImpl.pys   commit s   	 		c    s     d }  y/  |  i i   }  | i    g  |  _ Wn@  t i j
 o. }  d }  |  i i
    d G| GHn X | Sd  S(   Ni   i    s   CORBA.SystemException(   s   rcs   selfs   _sessionManagers   getDataStoreSessions   sessions   aborts   _invalids   CORBAs   SystemExceptions   es   resetSession(   s   selfs   sessions   es   rc(    (    s   DataStoreInterfaceImpl.pys   abort s   		i   c    s     | |  _ d  S(   N(   s   cachingEnableds   selfs   _cachingEnabled(   s   selfs   cachingEnabled(    (    s   DataStoreInterfaceImpl.pys   enableCaching s   c    s     h  |  _  g  |  _ d  S(   N(   s   selfs   _caches   _invalid(   s   self(    (    s   DataStoreInterfaceImpl.pys
   clearCache s   c    s      d }  g  }  y(  |  i i   }  | i |  } Wn@  t i	 j
 o. }  d }  |  i i    d G| GHn X | | f Sd S(   sA   Perform a straight DataStoreSession.get, i.e. ignore local cache.i   i    s   CORBA.SystemExceptionN(   s   rcs   results   selfs   _sessionManagers   getDataStoreSessions   sessions   gets   keyss   CORBAs   SystemExceptions   es   resetSession(   s   selfs   keyss   sessions   es   results   rc(    (    s   DataStoreInterfaceImpl.pys   _get s   			(   s   __init__s   Nones   gets   getAlls   internalGets   sets   removes   commits   aborts   enableCachings
   clearCaches   _get(    (    (    s   DataStoreInterfaceImpl.pys   InterfaceImpl s   2s   _SessionManagerc      sJ    d  Z    d   Z  d   Z  d   Z  d   Z  d   Z RS(   sF   Simply calls DataStore.endSession() when the module is no longer used.c    sw     |  i    t i t i t i  |  _  |  i i d  |  _	  |  i	 i
 t i  |  _	  t d  |  _ d  S(   Ns   NameServices	   DataStore(   s   selfs   resetSessions   CORBAs   ORB_inits   syss   argvs   ORB_IDs   _orbs   resolve_initial_referencess   _ctxs   _narrows	   CosNamings   NamingContexts   getNamePaths   path(   s   self(    (    s   DataStoreInterfaceImpl.pys   __init__ s
   c    s.     |  i t i j o  |  i   n d  S(   N(   s   selfs   dataStoreSessions   DataStoreSessions   _nils
   endSession(   s   self(    (    s   DataStoreInterfaceImpl.pys   __del__ s   c    sU     t  i |  i  o.  |  i i |  i  }  | i   |  _ n  |  i Sd  S(   N(	   s   CORBAs   is_nils   selfs   dataStoreSessions   _ctxs   resolves   paths	   dataStores   startSession(   s   selfs	   dataStore(    (    s   DataStoreInterfaceImpl.pys   getDataStoreSession s   c    s2     |  i i |  i  }  | i |  i  d  S(   N(   s   selfs   _ctxs   resolves   paths	   dataStores
   endSessions   dataStoreSession(   s   selfs	   dataStore(    (    s   DataStoreInterfaceImpl.pys
   endSession s   c    s     t  i |  _ d  S(   N(   s   DataStoreSessions   _nils   selfs   dataStoreSession(   s   self(    (    s   DataStoreInterfaceImpl.pys   resetSession s   (   s   __doc__s   __init__s   __del__s   getDataStoreSessions
   endSessions   resetSession(    (    (    s   DataStoreInterfaceImpl.pys   _SessionManager s   		(   s   __doc__s   syss	   CosNamings   omniORBs   CORBAs   twccommon.corbas   getNamePaths   twc.corba.ClientCores	   DataStores   DataStoreSessions   InterfaceImpls   _SessionManager(   s   syss   CORBAs	   CosNamings   DataStoreSessions	   DataStores   getNamePaths   InterfaceImpls   _SessionManager(    (    s   DataStoreInterfaceImpl.pys   ? s   