Search in sources :

Example 96 with Config

use of com.hazelcast.config.Config in project hazelcast by hazelcast.

the class TopicMBean method getConfig.

@ManagedAnnotation("config")
public String getConfig() {
    Config config = service.instance.getConfig();
    TopicConfig topicConfig = config.findTopicConfig(managedObject.getName());
    return topicConfig.toString();
}
Also used : Config(com.hazelcast.config.Config) TopicConfig(com.hazelcast.config.TopicConfig) TopicConfig(com.hazelcast.config.TopicConfig)

Example 97 with Config

use of com.hazelcast.config.Config in project hazelcast by hazelcast.

the class MemberConfigRequest method writeResponse.

@Override
public void writeResponse(ManagementCenterService mcs, JsonObject root) {
    final JsonObject result = new JsonObject();
    ConfigXmlGenerator configXmlGenerator = new ConfigXmlGenerator(true);
    Config config = mcs.getHazelcastInstance().getConfig();
    String configXmlString = configXmlGenerator.generate(config);
    result.add("configXmlString", configXmlString);
    root.add("result", result);
}
Also used : Config(com.hazelcast.config.Config) JsonObject(com.eclipsesource.json.JsonObject) ConfigXmlGenerator(com.hazelcast.config.ConfigXmlGenerator)

Example 98 with Config

use of com.hazelcast.config.Config in project hazelcast by hazelcast.

the class WriteBehindStore method getInMemoryFormat.

private static InMemoryFormat getInMemoryFormat(MapStoreContext mapStoreContext) {
    MapServiceContext mapServiceContext = mapStoreContext.getMapServiceContext();
    NodeEngine nodeEngine = mapServiceContext.getNodeEngine();
    Config config = nodeEngine.getConfig();
    String mapName = mapStoreContext.getMapName();
    MapConfig mapConfig = config.findMapConfig(mapName);
    return mapConfig.getInMemoryFormat();
}
Also used : NodeEngine(com.hazelcast.spi.NodeEngine) MapConfig(com.hazelcast.config.MapConfig) Config(com.hazelcast.config.Config) MapStoreConfig(com.hazelcast.config.MapStoreConfig) MapConfig(com.hazelcast.config.MapConfig) MapServiceContext(com.hazelcast.map.impl.MapServiceContext)

Example 99 with Config

use of com.hazelcast.config.Config in project hazelcast by hazelcast.

the class ExpirationManager method getInteger.

private int getInteger(String propertyName, int defaultValue) {
    Config config = nodeEngine.getConfig();
    String property = config.getProperty(propertyName);
    return property == null ? defaultValue : parseInt(property);
}
Also used : Config(com.hazelcast.config.Config)

Example 100 with Config

use of com.hazelcast.config.Config in project hazelcast by hazelcast.

the class BasicMapStoreContext method setStoreImplToWritableMapStoreConfig.

private static void setStoreImplToWritableMapStoreConfig(NodeEngine nodeEngine, String mapName, Object store) {
    final Config config = nodeEngine.getConfig();
    // get writable config (not read-only one) from node engine.
    final MapConfig mapConfig = config.getMapConfig(mapName);
    final MapStoreConfig mapStoreConfig = mapConfig.getMapStoreConfig();
    mapStoreConfig.setImplementation(store);
}
Also used : Config(com.hazelcast.config.Config) MapConfig(com.hazelcast.config.MapConfig) MapStoreConfig(com.hazelcast.config.MapStoreConfig) MapConfig(com.hazelcast.config.MapConfig) MapStoreConfig(com.hazelcast.config.MapStoreConfig)

Aggregations

Config (com.hazelcast.config.Config)1186 Test (org.junit.Test)838 HazelcastInstance (com.hazelcast.core.HazelcastInstance)815 QuickTest (com.hazelcast.test.annotation.QuickTest)718 ParallelTest (com.hazelcast.test.annotation.ParallelTest)648 TestHazelcastInstanceFactory (com.hazelcast.test.TestHazelcastInstanceFactory)361 MapConfig (com.hazelcast.config.MapConfig)339 MapStoreConfig (com.hazelcast.config.MapStoreConfig)211 CountDownLatch (java.util.concurrent.CountDownLatch)145 NightlyTest (com.hazelcast.test.annotation.NightlyTest)142 NearCacheConfig (com.hazelcast.config.NearCacheConfig)125 Before (org.junit.Before)115 AssertTask (com.hazelcast.test.AssertTask)113 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)93 MapIndexConfig (com.hazelcast.config.MapIndexConfig)91 ClientConfig (com.hazelcast.client.config.ClientConfig)83 IMap (com.hazelcast.core.IMap)81 GroupConfig (com.hazelcast.config.GroupConfig)67 ListenerConfig (com.hazelcast.config.ListenerConfig)60 JoinConfig (com.hazelcast.config.JoinConfig)58