当前位置: 首页>>代码示例>>Java>>正文


Java NetworkConfig.setSSLConfig方法代码示例

本文整理汇总了Java中com.hazelcast.config.NetworkConfig.setSSLConfig方法的典型用法代码示例。如果您正苦于以下问题:Java NetworkConfig.setSSLConfig方法的具体用法?Java NetworkConfig.setSSLConfig怎么用?Java NetworkConfig.setSSLConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.hazelcast.config.NetworkConfig的用法示例。


在下文中一共展示了NetworkConfig.setSSLConfig方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: HazelcastSessionDao

import com.hazelcast.config.NetworkConfig; //导入方法依赖的package包/类
public HazelcastSessionDao() {
    log.info("Initializing Hazelcast Shiro session persistence..");

    // configure Hazelcast instance
    final Config cfg = new Config();
    cfg.setInstanceName(hcInstanceName);
    // group configuration
    cfg.setGroupConfig(new GroupConfig(HC_GROUP_NAME, HC_GROUP_PASSWORD));
    // network configuration initialization
    final NetworkConfig netCfg = new NetworkConfig();
    netCfg.setPortAutoIncrement(true);
    netCfg.setPort(HC_PORT);
    // multicast
    final MulticastConfig mcCfg = new MulticastConfig();
    mcCfg.setEnabled(false);
    mcCfg.setMulticastGroup(HC_MULTICAST_GROUP);
    mcCfg.setMulticastPort(HC_MULTICAST_PORT);
    // tcp
    final TcpIpConfig tcpCfg = new TcpIpConfig();
    tcpCfg.addMember("127.0.0.1");
    tcpCfg.setEnabled(false);
    // network join configuration
    final JoinConfig joinCfg = new JoinConfig();
    joinCfg.setMulticastConfig(mcCfg);
    joinCfg.setTcpIpConfig(tcpCfg);
    netCfg.setJoin(joinCfg);
    // ssl
    netCfg.setSSLConfig(new SSLConfig().setEnabled(false));

    // get map
    map = Hazelcast.newHazelcastInstance(cfg).getMap(HC_MAP);
    log.info("Hazelcast Shiro session persistence initialized.");
}
 
开发者ID:summerDp,项目名称:dpCms,代码行数:34,代码来源:HazelcastSessionDao.java

示例2: setNetwork

import com.hazelcast.config.NetworkConfig; //导入方法依赖的package包/类
private void setNetwork(NetworkConfig network) {
	// network.setPublicAddress("11.22.33.44");
	network.setPort(port);
	network.setPortAutoIncrement(true);
	network.setPortCount(100);
	network.addOutboundPortDefinition("35000-35100");
	// InterfacesConfig interfaces=new InterfacesConfig();
	// interfaces.getInterfaces();
	// network.setInterfaces(interfaces);
	network.getInterfaces().setEnabled(true);
	network.getInterfaces().addInterface("*.*.*.*");

	network.setSSLConfig(getSslConfig());
	setNetworkJoin(network.getJoin());
}
 
开发者ID:eetlite,项目名称:eet.osslite.cz,代码行数:16,代码来源:HazelcastConfiguration.java

示例3: HazelcastSessionDao

import com.hazelcast.config.NetworkConfig; //导入方法依赖的package包/类
public HazelcastSessionDao() {
  log.info("Initializating Hazelcast Shiro session persistence..");

  // configure Hazelcast instance
  hcInstanceName = UUID.randomUUID().toString();
  Config cfg = new Config();
  cfg.setInstanceName(hcInstanceName);
  // group configuration
  cfg.setGroupConfig(new GroupConfig(HC_GROUP_NAME, HC_GROUP_PASSWORD));

  // network configuration initialization
  NetworkConfig netCfg = new NetworkConfig();
  netCfg.setPortAutoIncrement(true);
  netCfg.setPort(HC_PORT);
  // multicast
  MulticastConfig mcCfg = new MulticastConfig();
  mcCfg.setEnabled(true);
  mcCfg.setMulticastGroup(HC_MULTICAST_GROUP);
  mcCfg.setMulticastPort(HC_MULTICAST_PORT);
  // tcp
  TcpIpConfig tcpCfg = new TcpIpConfig();
  tcpCfg.setEnabled(false);
  // network join configuration
  JoinConfig joinCfg = new JoinConfig();
  joinCfg.setMulticastConfig(mcCfg);
  joinCfg.setTcpIpConfig(tcpCfg);
  netCfg.setJoin(joinCfg);
  // ssl
  netCfg.setSSLConfig(new SSLConfig().setEnabled(false));

  // get map
  map = Hazelcast.newHazelcastInstance(cfg).getMap(HC_MAP);

  log.info("Hazelcast Shiro session persistence initialized.");
}
 
开发者ID:pires,项目名称:fabric8-cxf-shiro,代码行数:36,代码来源:HazelcastSessionDao.java

示例4: main

import com.hazelcast.config.NetworkConfig; //导入方法依赖的package包/类
public static void main(String[] args) throws InterruptedException {
  final Config cfg = new Config();
  cfg.setInstanceName(UUID.randomUUID().toString());

  final Properties props = new Properties();
  props.put("hazelcast.rest.enabled", false);
  props.put("hazelcast.logging.type", "slf4j");
  props.put("hazelcast.connect.all.wait.seconds", 45);
  props.put("hazelcast.operation.call.timeout.millis", 30000);

  // group configuration
  cfg.setGroupConfig(new GroupConfig(args[0],
      args[1]));
  // network configuration initialization
  final NetworkConfig netCfg = new NetworkConfig();
  netCfg.setPortAutoIncrement(true);
  netCfg.setPort(5701);
  // multicast
  final MulticastConfig mcCfg = new MulticastConfig();
  mcCfg.setEnabled(false);
  // tcp
  final TcpIpConfig tcpCfg = new TcpIpConfig();
  tcpCfg.addMember("127.0.0.1");
  tcpCfg.setEnabled(true);
  // network join configuration
  final JoinConfig joinCfg = new JoinConfig();
  joinCfg.setMulticastConfig(mcCfg);
  joinCfg.setTcpIpConfig(tcpCfg);
  netCfg.setJoin(joinCfg);
  // ssl
  netCfg.setSSLConfig(new SSLConfig().setEnabled(false));

  // creating cassandra client
  final CassandraClient dao = new CassandraClient();
  dao.initialize(args[2]);

  final HazelcastMapStore mapStore = new HazelcastMapStore(User.class);
  mapStore.setDao(dao);


  // Adding mapstore
  final MapConfig mapCfg = cfg.getMapConfig("cassandra-map-store");

  final MapStoreConfig mapStoreCfg = new MapStoreConfig();
  mapStoreCfg.setImplementation(mapStore);
  mapStoreCfg.setWriteDelaySeconds(1);
  // to load all map at same time
  mapStoreCfg.setInitialLoadMode(MapStoreConfig.InitialLoadMode.EAGER);
  mapCfg.setMapStoreConfig(mapStoreCfg);
  cfg.addMapConfig(mapCfg);


  HazelcastInstance instance = Hazelcast.newHazelcastInstance(cfg);

  // TERM signal processing
  Runtime.getRuntime().addShutdownHook(new Thread(() -> {
    Hazelcast.shutdownAll();
  }));
}
 
开发者ID:FlavioF,项目名称:docker-hazelcast-mapstore-cassandra,代码行数:60,代码来源:InstanceStart.java

示例5: getConfig

import com.hazelcast.config.NetworkConfig; //导入方法依赖的package包/类
public Config getConfig() {

    final Config cfg = new Config();
    cfg.setInstanceName(instanceName);

    final Properties props = new Properties();
    props.put("hazelcast.rest.enabled", false);
    props.put("hazelcast.logging.type", "slf4j");
    props.put("hazelcast.connect.all.wait.seconds", 45);
    props.put("hazelcast.operation.call.timeout.millis", 30000);

    // group configuration
    cfg.setGroupConfig(new GroupConfig(Constants.HC_GROUP_NAME,
        Constants.HC_GROUP_PASSWORD));
    // network configuration initialization
    final NetworkConfig netCfg = new NetworkConfig();
    netCfg.setPortAutoIncrement(true);
    netCfg.setPort(Constants.HC_PORT);
    // multicast
    final MulticastConfig mcCfg = new MulticastConfig();
    mcCfg.setEnabled(false);
    // tcp
    final TcpIpConfig tcpCfg = new TcpIpConfig();
    tcpCfg.addMember("127.0.0.1");
    tcpCfg.setEnabled(true);
    // network join configuration
    final JoinConfig joinCfg = new JoinConfig();
    joinCfg.setMulticastConfig(mcCfg);
    joinCfg.setTcpIpConfig(tcpCfg);
    netCfg.setJoin(joinCfg);
    // ssl
    netCfg.setSSLConfig(new SSLConfig().setEnabled(false));

    // Adding mapstore
    final MapConfig mapCfg = cfg.getMapConfig(storeType);

    final MapStoreConfig mapStoreCfg = new MapStoreConfig();
    mapStoreCfg.setImplementation(store);
    mapStoreCfg.setWriteDelaySeconds(1);
    // to load all map at same time
    mapStoreCfg.setInitialLoadMode(MapStoreConfig.InitialLoadMode.EAGER);
    mapCfg.setMapStoreConfig(mapStoreCfg);
    cfg.addMapConfig(mapCfg);
    return cfg;
  }
 
开发者ID:FlavioF,项目名称:hazelcast-mapstore-postgres-cassandra,代码行数:46,代码来源:MyHazelcastInstance.java


注:本文中的com.hazelcast.config.NetworkConfig.setSSLConfig方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。