Search in sources :

Example 1 with PreferencesRoot

use of org.apache.qpid.server.store.preferences.PreferencesRoot in project qpid-broker-j by apache.

the class AbstractVirtualHost method onOpen.

@Override
protected void onOpen() {
    super.onOpen();
    registerSystemNodes();
    _messageStore = createMessageStore();
    _messageStoreLogSubject = new MessageStoreLogSubject(getName(), _messageStore.getClass().getSimpleName());
    _messageStore.addEventListener(this, Event.PERSISTENT_MESSAGE_SIZE_OVERFULL);
    _messageStore.addEventListener(this, Event.PERSISTENT_MESSAGE_SIZE_UNDERFULL);
    _fileSystemMaxUsagePercent = getContextValue(Integer.class, Broker.STORE_FILESYSTEM_MAX_USAGE_PERCENT);
    _flowToDiskCheckPeriod = getContextValue(Long.class, FLOW_TO_DISK_CHECK_PERIOD);
    _isDiscardGlobalSharedSubscriptionLinksOnDetach = getContextValue(Boolean.class, DISCARD_GLOBAL_SHARED_SUBSCRIPTION_LINKS_ON_DETACH);
    QpidServiceLoader serviceLoader = new QpidServiceLoader();
    for (ConnectionValidator validator : serviceLoader.instancesOf(ConnectionValidator.class)) {
        if ((_enabledConnectionValidators.isEmpty() && (_disabledConnectionValidators.isEmpty()) || !_disabledConnectionValidators.contains(validator.getType())) || _enabledConnectionValidators.contains(validator.getType())) {
            _connectionValidators.add(validator);
        }
    }
    PreferencesRoot preferencesRoot = (VirtualHostNode) getParent();
    _preferenceStore = preferencesRoot.createPreferenceStore();
    _linkRegistry = createLinkRegistry();
    createHousekeepingExecutor();
}
Also used : QpidServiceLoader(org.apache.qpid.server.plugin.QpidServiceLoader) PreferencesRoot(org.apache.qpid.server.store.preferences.PreferencesRoot) AtomicLong(java.util.concurrent.atomic.AtomicLong) MessageStoreLogSubject(org.apache.qpid.server.logging.subjects.MessageStoreLogSubject) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ConnectionValidator(org.apache.qpid.server.plugin.ConnectionValidator)

Example 2 with PreferencesRoot

use of org.apache.qpid.server.store.preferences.PreferencesRoot in project qpid-broker-j by apache.

the class BrokerImpl method onOpen.

@Override
protected void onOpen() {
    super.onOpen();
    PreferencesRoot preferencesRoot = (SystemConfig) getParent();
    _preferenceStore = preferencesRoot.createPreferenceStore();
    getEventLogger().message(BrokerMessages.STARTUP(CommonProperties.getReleaseVersion(), CommonProperties.getBuildVersion()));
    getEventLogger().message(BrokerMessages.PLATFORM(System.getProperty("java.vendor"), System.getProperty("java.runtime.version", System.getProperty("java.version")), SystemUtils.getOSName(), SystemUtils.getOSVersion(), SystemUtils.getOSArch(), String.valueOf(getNumberOfCores())));
    long directMemory = getMaxDirectMemorySize();
    long heapMemory = Runtime.getRuntime().maxMemory();
    getEventLogger().message(BrokerMessages.MAX_MEMORY(heapMemory, directMemory));
    _flowToDiskThreshold = getContextValue(Long.class, BROKER_FLOW_TO_DISK_THRESHOLD);
    _compactMemoryThreshold = getContextValue(Long.class, Broker.COMPACT_MEMORY_THRESHOLD);
    _compactMemoryInterval = getContextValue(Long.class, Broker.COMPACT_MEMORY_INTERVAL);
    _housekeepingCheckPeriod = getContextValue(Long.class, Broker.QPID_BROKER_HOUSEKEEPING_CHECK_PERIOD);
    if (SystemUtils.getProcessPid() != null) {
        getEventLogger().message(BrokerMessages.PROCESS(SystemUtils.getProcessPid()));
    }
    registerSystemAddressSpaces();
    assignTargetSizes();
}
Also used : PreferencesRoot(org.apache.qpid.server.store.preferences.PreferencesRoot) AtomicLong(java.util.concurrent.atomic.AtomicLong)

Aggregations

AtomicLong (java.util.concurrent.atomic.AtomicLong)2 PreferencesRoot (org.apache.qpid.server.store.preferences.PreferencesRoot)2 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 MessageStoreLogSubject (org.apache.qpid.server.logging.subjects.MessageStoreLogSubject)1 ConnectionValidator (org.apache.qpid.server.plugin.ConnectionValidator)1 QpidServiceLoader (org.apache.qpid.server.plugin.QpidServiceLoader)1