Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.directory
Class DirectoryCache

java.lang.Object
  extended by org.nuxeo.ecm.directory.DirectoryCache

public class DirectoryCache
extends Object

Very simple cache system to cache directory entry lookups (not search queries).

Beware that this cache is not transaction aware (which is not a problem for LDAP directories anyway).

If we want to implement a smarter caching strategy we might prefer to base it on jboss-cache instead of reinventing the wheel.

Author:
Olivier Grisel

Constructor Summary
DirectoryCache()
           
 
Method Summary
 DocumentModel getEntry(String entryId, EntrySource source)
           
 DocumentModel getEntry(String entryId, EntrySource source, boolean fetchReferences)
           
 void invalidate(List<String> entryIds)
           
 void invalidate(String... entryIds)
           
 void invalidateAll()
           
 void setMaxSize(int maxSize)
           
 void setTimeout(int timeout)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryCache

public DirectoryCache()
Method Detail

getEntry

public DocumentModel getEntry(String entryId,
                              EntrySource source)
                       throws DirectoryException
Throws:
DirectoryException

getEntry

public DocumentModel getEntry(String entryId,
                              EntrySource source,
                              boolean fetchReferences)
                       throws DirectoryException
Throws:
DirectoryException

invalidate

public void invalidate(List<String> entryIds)

invalidate

public void invalidate(String... entryIds)

invalidateAll

public void invalidateAll()

setTimeout

public void setTimeout(int timeout)

setMaxSize

public void setMaxSize(int maxSize)

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.