this.dirContext = dirContext;
if (dirContext instanceof BaseDirContext) {
// Initialize parameters based on the associated dir context, like
// the caching policy.
if (((BaseDirContext) dirContext).isCached()) {
cache = Collections.synchronizedMap(new LRUMap(cacheSize));
cacheTTL = ((BaseDirContext) dirContext).getCacheTTL();
cacheObjectMaxSize =
((BaseDirContext) dirContext).getCacheObjectMaxSize();
}
}