本文整理匯總了Java中com.hazelcast.config.Config.getProperty方法的典型用法代碼示例。如果您正苦於以下問題:Java Config.getProperty方法的具體用法?Java Config.getProperty怎麽用?Java Config.getProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.hazelcast.config.Config
的用法示例。
在下文中一共展示了Config.getProperty方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: get
import com.hazelcast.config.Config; //導入方法依賴的package包/類
@Override
public PropertyValue get(String key) {
Config hcConfig = hazelcastInstance.getConfig();
String value = hcConfig.getProperty(key);
if(value==null){
return null;
}
return PropertyValue.builder(key, value, getName())
.addMetaEntry("backend", "Hazelcast")
.addMetaEntry("instance", hcConfig.getInstanceName())
.addMetaEntry("mapReference", mapReference)
.build();
}
示例2: getMaxOperationTimeout
import com.hazelcast.config.Config; //導入方法依賴的package包/類
public static long getMaxOperationTimeout(final HazelcastInstance instance) {
String maxOpTimeoutProp = null;
try {
Config config = instance.getConfig();
maxOpTimeoutProp = config.getProperty(CacheEnvironment.HAZELCAST_OPERATION_TIMEOUT);
} catch (UnsupportedOperationException e) {
// HazelcastInstance is instance of HazelcastClient.
Logger.getLogger(HazelcastTimestamper.class).finest(e);
}
if (maxOpTimeoutProp != null) {
return Long.parseLong(maxOpTimeoutProp);
}
return Long.MAX_VALUE;
}
示例3: getMaxOperationTimeout
import com.hazelcast.config.Config; //導入方法依賴的package包/類
public static long getMaxOperationTimeout(HazelcastInstance instance) {
String maxOpTimeoutProp = null;
try {
Config config = instance.getConfig();
maxOpTimeoutProp = config.getProperty(CacheEnvironment.HAZELCAST_OPERATION_TIMEOUT);
} catch (UnsupportedOperationException e) {
// HazelcastInstance is instance of HazelcastClient.
Logger.getLogger(HazelcastTimestamper.class).finest(e);
}
if (maxOpTimeoutProp != null) {
return Long.parseLong(maxOpTimeoutProp);
}
return Long.MAX_VALUE;
}