| | |
| | | import java.util.Set; |
| | | import java.util.concurrent.ConcurrentLinkedQueue; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.config.Configuration; |
| | | import org.forgerock.opendj.config.server.ConfigException; |
| | | import org.forgerock.opendj.ldap.ConditionResult; |
| | |
| | | public abstract class LocalBackend<C extends Configuration> extends Backend<C> |
| | | // should have been BackendCfg instead of Configuration |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** Indicates whether this is a private backend or one that holds user data. */ |
| | | private boolean isPrivateBackend; |
| | | |
| | |
| | | { |
| | | for (PersistentSearch psearch : persistentSearches) |
| | | { |
| | | psearch.cancel(); |
| | | // Tell the clients that no more changes are coming: this backend will not notify them any |
| | | // more, and a cancelled persistent search which sends nothing leaves them waiting forever. |
| | | final LocalizableMessage reason = WARN_PSEARCH_BACKEND_UNAVAILABLE.get(getBackendID()); |
| | | logger.warn(reason); |
| | | psearch.cancelAndNotifyClient(reason); |
| | | } |
| | | persistentSearches.clear(); |
| | | closeBackend(); |