Ejemplo n.º 1
0
    def __init__(self, directory, expireSeconds=30, lookupsBetweenPurges=0, negativeCaching=True):
        BaseDirectoryService.__init__(self, directory.realmName)
        self._directory = directory

        # Patch the wrapped directory service's recordWithXXX to instead
        # use this cache

        directory._wrapped_recordWithUID = directory.recordWithUID
        directory.recordWithUID = self.recordWithUID

        directory._wrapped_recordWithGUID = directory.recordWithGUID
        directory.recordWithGUID = self.recordWithGUID

        directory._wrapped_recordWithShortName = directory.recordWithShortName
        directory.recordWithShortName = self.recordWithShortName

        directory._wrapped_recordsWithEmailAddress = directory.recordsWithEmailAddress
        directory.recordsWithEmailAddress = self.recordsWithEmailAddress

        self._expireSeconds = expireSeconds

        if lookupsBetweenPurges == 0:
            self._purgingEnabled = False
        else:
            self._purgingEnabled = True
            self._lookupsBetweenPurges = lookupsBetweenPurges

        self.negativeCaching = negativeCaching

        self.resetCache()
Ejemplo n.º 2
0
    def __init__(self, directory, store, augmentDB):
        BaseDirectoryService.__init__(self, directory.realmName)
        self._directory = directory
        self._store = store
        self._augmentDB = augmentDB

        # An LDAP DS has extra info to expose via the dashboard
        # This is assigned in buildDirectory()
        self._ldapDS = None
Ejemplo n.º 3
0
    def __init__(self, directory, store, augmentDB):
        BaseDirectoryService.__init__(self, directory.realmName)
        self._directory = directory
        self._store = store
        self._augmentDB = augmentDB

        # An LDAP DS has extra info to expose via the dashboard
        # This is assigned in buildDirectory()
        self._ldapDS = None
Ejemplo n.º 4
0
    def __init__(self, directory, expireSeconds=30):
        BaseDirectoryService.__init__(self, directory.realmName)
        self._directory = directory

        # Patch the wrapped directory service's recordWithXXX to instead
        # use this cache

        directory._wrapped_recordWithUID = directory.recordWithUID
        directory.recordWithUID = self.recordWithUID

        directory._wrapped_recordWithGUID = directory.recordWithGUID
        directory.recordWithGUID = self.recordWithGUID

        directory._wrapped_recordWithShortName = directory.recordWithShortName
        directory.recordWithShortName = self.recordWithShortName

        directory._wrapped_recordsWithEmailAddress = directory.recordsWithEmailAddress
        directory.recordsWithEmailAddress = self.recordsWithEmailAddress

        self._expireSeconds = expireSeconds
        self.resetCache()
Ejemplo n.º 5
0
    def __init__(self, directory, expireSeconds=30):
        BaseDirectoryService.__init__(self, directory.realmName)
        self._directory = directory

        # Patch the wrapped directory service's recordWithXXX to instead
        # use this cache

        directory._wrapped_recordWithUID = directory.recordWithUID
        directory.recordWithUID = self.recordWithUID

        directory._wrapped_recordWithGUID = directory.recordWithGUID
        directory.recordWithGUID = self.recordWithGUID

        directory._wrapped_recordWithShortName = directory.recordWithShortName
        directory.recordWithShortName = self.recordWithShortName

        directory._wrapped_recordsWithEmailAddress = directory.recordsWithEmailAddress
        directory.recordsWithEmailAddress = self.recordsWithEmailAddress

        self._expireSeconds = expireSeconds
        self.resetCache()
Ejemplo n.º 6
0
 def __init__(self, directory, store, augmentDB):
     BaseDirectoryService.__init__(self, directory.realmName)
     self._directory = directory
     self._store = store
     self._augmentDB = augmentDB
Ejemplo n.º 7
0
 def __init__(self, realmName, endpointDescriptor):
     BaseDirectoryService.__init__(self, realmName)
     self.endpointDescriptor = endpointDescriptor
     self._recordsByName = {}
Ejemplo n.º 8
0
 def __init__(self, realmName, store):
     BaseDirectoryService.__init__(self, realmName)
     self._store = store
     self._masterDirectory = None
Ejemplo n.º 9
0
 def __init__(self, realmName, endpointDescriptor):
     BaseDirectoryService.__init__(self, realmName)
     self.endpointDescriptor = endpointDescriptor
     self._recordsByName = {}
Ejemplo n.º 10
0
    def __init__(self, realmName):
        BaseDirectoryService.__init__(self, realmName)

        self.flush()
Ejemplo n.º 11
0
 def __init__(self, directory, store, augmentDB):
     BaseDirectoryService.__init__(self, directory.realmName)
     self._directory = directory
     self._store = store
     self._augmentDB = augmentDB
Ejemplo n.º 12
0
 def __init__(self, realmName, store):
     BaseDirectoryService.__init__(self, realmName)
     self._store = store
     self._masterDirectory = None
Ejemplo n.º 13
0
 def __init__(self, realmName, wikiHost, wikiPort):
     BaseDirectoryService.__init__(self, realmName)
     self.wikiHost = wikiHost
     self.wikiPort = wikiPort
     self._recordsByName = {}
Ejemplo n.º 14
0
 def __init__(self):
     BaseDirectoryService.__init__(self, realmName="no realm")