Beispiel #1
0
 def __init__(self, pluginstore):
     Manager.__init__(self)
     self.setName("events")
     self._pluginstore = pluginstore
     self._fields = dict()
     self._idstore = None
     self._idcache = []
Beispiel #2
0
 def __init__(self, pluginstore):
     Manager.__init__(self)
     self.setName("events")
     self._pluginstore = pluginstore
     self._fields = dict()
     self._idstore = None
     self._idcache = []
Beispiel #3
0
 def __init__(self, indexstore):
     if not IIndexStore.providedBy(indexstore):
         raise TypeError("indexstore class does not implement IIndexStore")
     Manager.__init__(self)
     self.setName("queries")
     self._indexstore = indexstore
     self.maxResultSize = 10
     self.maxIterations = 5
Beispiel #4
0
 def startService(self):
     """
     Read the last document identifier from the backing file, and
     fill the cache with new identifiers.
     """
     Manager.startService(self)
     self._idstore = os.open(self._backingfile, os.O_RDWR | os.O_CREAT, 0600)
     self._refillcache()
     logger.debug("loaded %i entries into id cache" % self.cachesize)
Beispiel #5
0
 def __init__(self, indexstore):
     if not IIndexStore.providedBy(indexstore):
         raise TypeError("indexstore class does not implement IIndexStore")
     Manager.__init__(self)
     self.setName("queries")
     self._indexstore = indexstore
     self.maxResultSize = 10
     self.maxIterations = 5
     self._task = getUtility(IScheduler).addTask(self.name)
Beispiel #6
0
 def __init__(self, indexstore):
     if not IIndexStore.providedBy(indexstore):
         raise TypeError("indexstore class does not implement IIndexStore")
     Manager.__init__(self)
     self.setName("queries")
     self._indexstore = indexstore
     self.maxResultSize = 10
     self.maxIterations = 5
     self._task = getUtility(IScheduler).addTask(self.name)
Beispiel #7
0
 def startService(self):
     """
     Read the last document identifier from the backing file, and
     fill the cache with new identifiers.
     """
     Manager.startService(self)
     self._idstore = os.open(self._backingfile, os.O_RDWR | os.O_CREAT,
                             0600)
     self._refillcache()
     logger.debug("loaded %i entries into id cache" % self.cachesize)
Beispiel #8
0
 def __init__(self, pluginstore, authmanager, querymanager):
     if not IPluginStore.providedBy(pluginstore):
         raise TypeError("authmanager class does not implement IAuthManager")
     if not IAuthManager.providedBy(authmanager):
         raise TypeError("authmanager class does not implement IAuthManager")
     if not IQueryManager.providedBy(querymanager):
         raise TypeError("querymanager class does not implement IQueryManager")
     Manager.__init__(self)
     self.setName("listeners")
     self._pluginstore = pluginstore
     self._authmanager = authmanager
     self._querymanager = querymanager
     self._listeners = {}
Beispiel #9
0
 def __init__(self, pluginstore, authmanager, querymanager):
     if not IPluginStore.providedBy(pluginstore):
         raise TypeError(
             "authmanager class does not implement IAuthManager")
     if not IAuthManager.providedBy(authmanager):
         raise TypeError(
             "authmanager class does not implement IAuthManager")
     if not IQueryManager.providedBy(querymanager):
         raise TypeError(
             "querymanager class does not implement IQueryManager")
     Manager.__init__(self)
     self.setName("listeners")
     self._pluginstore = pluginstore
     self._authmanager = authmanager
     self._querymanager = querymanager
     self._listeners = {}
Beispiel #10
0
 def __init__(self, pluginstore, eventfactory, fieldstore):
     if not IPluginStore.providedBy(pluginstore):
         raise TypeError("pluginstore class does not implement IPluginStore")
     if not IEventFactory.providedBy(eventfactory):
         raise TypeError("eventfactory class does not implement IEventFactory")
     if not IFieldStore.providedBy(fieldstore):
         raise TypeError("fieldstore class does not implement IFieldStore")
     Manager.__init__(self)
     self.setName("routes")
     self._pluginstore = pluginstore
     self._eventfactory = eventfactory
     self._fieldstore = fieldstore
     self._routes = {}
     self._inputs = {}
     self._filters = {}
     self._outputs = {}
     self._searchables = {}
Beispiel #11
0
 def stopService(self):
     """
     Write back the last document identifier, and sync the backing
     file to disk.
     """
     self._writelast(self._idcache.pop(0))
     os.close(self._idstore)
     self._idstore = None
     self._idcache = []
     return Manager.stopService(self)
Beispiel #12
0
 def stopService(self):
     """
     Write back the last document identifier, and sync the backing
     file to disk.
     """
     self._writelast(self._idcache.pop(0))
     os.close(self._idstore)
     self._idstore = None
     self._idcache = []
     return Manager.stopService(self)
Beispiel #13
0
 def __init__(self, pluginstore, eventfactory, fieldstore):
     if not IPluginStore.providedBy(pluginstore):
         raise TypeError(
             "pluginstore class does not implement IPluginStore")
     if not IEventFactory.providedBy(eventfactory):
         raise TypeError(
             "eventfactory class does not implement IEventFactory")
     if not IFieldStore.providedBy(fieldstore):
         raise TypeError("fieldstore class does not implement IFieldStore")
     Manager.__init__(self)
     self.setName("routes")
     self._pluginstore = pluginstore
     self._eventfactory = eventfactory
     self._fieldstore = fieldstore
     self._routes = {}
     self._inputs = {}
     self._filters = {}
     self._outputs = {}
     self._searchables = {}
Beispiel #14
0
 def stopService(self):
     for input in self._inputs.values():
         input.stopService()
     for output in self._outputs.values():
         output.stopService()
     return Manager.stopService(self)
Beispiel #15
0
 def startService(self):
     Manager.startService(self)
     for output in self._outputs.values():
         output.startService()
     for input in self._inputs.values():
         input.startService()
Beispiel #16
0
 def __init__(self):
     Manager.__init__(self)
     self.setName("plugins")
     self._components = {}
Beispiel #17
0
 def __init__(self):
     Manager.__init__(self)
     self._creds = None
     self._roles = {}
Beispiel #18
0
 def __init__(self):
     Manager.__init__(self)
     self.setName("plugins")
     self._components = {}
Beispiel #19
0
 def stopService(self):
     for input in self._inputs.values():
         input.stopService()
     for output in self._outputs.values():
         output.stopService()
     return Manager.stopService(self)
Beispiel #20
0
 def startService(self):
     Manager.startService(self)
     for output in self._outputs.values():
         output.startService()
     for input in self._inputs.values():
         input.startService()