public TopicProxySupport(String name, NodeEngine nodeEngine, TopicService service) { super(nodeEngine, service); this.name = name; this.configClassLoader = nodeEngine.getConfigClassLoader(); this.topicService = service; this.topicStats = topicService.getLocalTopicStats(name); }
public TopicProxySupport(String name, NodeEngine nodeEngine, TopicService service) { super(nodeEngine, service); this.name = name; this.configClassLoader = nodeEngine.getConfigClassLoader(); this.topicService = service; this.topicStats = topicService.getLocalTopicStats(name); }
@Override public MapMergePolicy createNew(String className) { try { return newInstance(nodeEngine.getConfigClassLoader(), className); } catch (Exception e) { throw new InvalidConfigurationException("Invalid MapMergePolicy: " + className, e); } } };
@Override public ReplicatedMapMergePolicy createNew(String className) { try { return newInstance(nodeEngine.getConfigClassLoader(), className); } catch (Exception e) { throw new InvalidConfigurationException("Invalid ReplicatedMapMergePolicy: " + className, e); } } };
@Override public MapMergePolicy createNew(String className) { try { return newInstance(nodeEngine.getConfigClassLoader(), className); } catch (Exception e) { throw new InvalidConfigurationException("Invalid MapMergePolicy: " + className, e); } } };
@Override public ReplicatedMapMergePolicy createNew(String className) { try { return newInstance(nodeEngine.getConfigClassLoader(), className); } catch (Exception e) { throw new InvalidConfigurationException("Invalid ReplicatedMapMergePolicy: " + className, e); } } };
@Override public SplitBrainMergePolicy createNew(String className) { try { return newInstance(nodeEngine.getConfigClassLoader(), className); } catch (Exception e) { throw new InvalidConfigurationException("Invalid SplitBrainMergePolicy: " + className, e); } } };
protected EvictionPolicyEvaluator<Data, R> createEvictionPolicyEvaluator(EvictionConfig evictionConfig) { checkEvictionConfig(evictionConfig, false); return EvictionPolicyEvaluatorProvider.getEvictionPolicyEvaluator(evictionConfig, nodeEngine.getConfigClassLoader()); }
protected EvictionPolicyEvaluator<Data, R> createEvictionPolicyEvaluator(EvictionConfig evictionConfig) { checkEvictionConfig(evictionConfig, false); return EvictionPolicyEvaluatorProvider.getEvictionPolicyEvaluator(evictionConfig, nodeEngine.getConfigClassLoader()); }
@Override public SplitBrainMergePolicy createNew(String className) { try { return newInstance(nodeEngine.getConfigClassLoader(), className); } catch (Exception e) { throw new InvalidConfigurationException("Invalid SplitBrainMergePolicy: " + className, e); } } };
/** * Initializes the ring buffer with references to other services, the * ringbuffer store and the config. This is because on a replication * operation the container is only partially constructed. The init method * finishes the configuration of the ring buffer container for further * usage. * * @param config the configuration of the ring buffer * @param nodeEngine the NodeEngine */ public void init(RingbufferConfig config, NodeEngine nodeEngine) { this.config = config; this.serializationService = nodeEngine.getSerializationService(); initRingbufferStore(nodeEngine.getConfigClassLoader()); }
/** * Initializes the ring buffer with references to other services, the * ringbuffer store and the config. This is because on a replication * operation the container is only partially constructed. The init method * finishes the configuration of the ring buffer container for further * usage. * * @param config the configuration of the ring buffer * @param nodeEngine the NodeEngine */ public void init(RingbufferConfig config, NodeEngine nodeEngine) { this.config = config; this.serializationService = nodeEngine.getSerializationService(); initRingbufferStore(nodeEngine.getConfigClassLoader()); }
@Override public CacheMergePolicy createNew(String className) { try { return newInstance(nodeEngine.getConfigClassLoader(), className); } catch (Exception e) { nodeEngine.getLogger(getClass()).severe(e); throw new InvalidConfigurationException("Invalid cache merge policy: " + className, e); } } };
@Override public CacheMergePolicy createNew(String className) { try { return newInstance(nodeEngine.getConfigClassLoader(), className); } catch (Exception e) { nodeEngine.getLogger(getClass()).severe(e); throw new InvalidConfigurationException("Invalid cache merge policy: " + className, e); } } };
public void setConfig(QueueConfig config, NodeEngine nodeEngine, QueueService service) { this.nodeEngine = nodeEngine; this.service = service; this.logger = nodeEngine.getLogger(QueueContainer.class); this.config = new QueueConfig(config); // init QueueStore QueueStoreConfig storeConfig = config.getQueueStoreConfig(); SerializationService serializationService = nodeEngine.getSerializationService(); ClassLoader classLoader = nodeEngine.getConfigClassLoader(); this.store = QueueStoreWrapper.create(name, storeConfig, serializationService, classLoader); }
public void setConfig(QueueConfig config, NodeEngine nodeEngine, QueueService service) { this.nodeEngine = nodeEngine; this.service = service; this.logger = nodeEngine.getLogger(QueueContainer.class); this.config = new QueueConfig(config); // init QueueStore QueueStoreConfig storeConfig = config.getQueueStoreConfig(); SerializationService serializationService = nodeEngine.getSerializationService(); ClassLoader classLoader = nodeEngine.getConfigClassLoader(); this.store = QueueStoreWrapper.create(name, storeConfig, serializationService, classLoader); }
@SuppressWarnings("unchecked") private <T extends EventListener> T initializeListener(ListenerConfig listenerConfig) { T listener = null; if (listenerConfig.getImplementation() != null) { listener = (T) listenerConfig.getImplementation(); } else if (listenerConfig.getClassName() != null) { try { listener = ClassLoaderUtil.newInstance(getNodeEngine().getConfigClassLoader(), listenerConfig.getClassName()); } catch (Exception e) { throw ExceptionUtil.rethrow(e); } } injectDependencies(listener); return listener; } }
@SuppressWarnings("unchecked") private <T extends EventListener> T initializeListener(ListenerConfig listenerConfig) { T listener = null; if (listenerConfig.getImplementation() != null) { listener = (T) listenerConfig.getImplementation(); } else if (listenerConfig.getClassName() != null) { try { listener = ClassLoaderUtil.newInstance(getNodeEngine().getConfigClassLoader(), listenerConfig.getClassName()); } catch (Exception e) { throw ExceptionUtil.rethrow(e); } } injectDependencies(listener); return listener; } }
public NodeQueryCacheContext(MapServiceContext mapServiceContext) { this.nodeEngine = mapServiceContext.getNodeEngine(); this.mapServiceContext = mapServiceContext; this.queryCacheScheduler = new NodeQueryCacheScheduler(mapServiceContext); this.queryCacheEventService = new NodeQueryCacheEventService(mapServiceContext, lifecycleMutexFactory); this.queryCacheConfigurator = new NodeQueryCacheConfigurator(nodeEngine.getConfig(), nodeEngine.getConfigClassLoader(), queryCacheEventService); this.invokerWrapper = new NodeInvokerWrapper(nodeEngine.getOperationService()); // init these in the end this.subscriberContext = new NodeSubscriberContext(this); this.publisherContext = new DefaultPublisherContext(this, nodeEngine, new RegisterMapListenerFunction()); flushPublishersOnNodeShutdown(); }
public NodeQueryCacheContext(MapServiceContext mapServiceContext) { this.nodeEngine = mapServiceContext.getNodeEngine(); this.mapServiceContext = mapServiceContext; this.queryCacheScheduler = new NodeQueryCacheScheduler(mapServiceContext); this.queryCacheEventService = new NodeQueryCacheEventService(mapServiceContext, lifecycleMutexFactory); this.queryCacheConfigurator = new NodeQueryCacheConfigurator(nodeEngine.getConfig(), nodeEngine.getConfigClassLoader(), queryCacheEventService); this.invokerWrapper = new NodeInvokerWrapper(nodeEngine.getOperationService()); // init these in the end this.subscriberContext = new NodeSubscriberContext(this); this.publisherContext = new DefaultPublisherContext(this, nodeEngine, new RegisterMapListenerFunction()); flushPublishersOnNodeShutdown(); }