Package org.infinispan.client.hotrod.configuration

Examples of org.infinispan.client.hotrod.configuration.Configuration


    private static final String PROPERTIES_FILE = "jdg.properties";
    private static final String CACHE_NAME = "teams";

  public static void main(String[] args) {
   
    Configuration configuration = new ConfigurationBuilder().addServers(jdgProperty(JDG_HOST) + ":" + jdgProperty(HOTROD_PORT)).build();
    RemoteCacheManager cacheManager = new RemoteCacheManager(configuration);
    RemoteCache<String, Object> cache = cacheManager.getCache(CACHE_NAME);
   
    for(int i = 1 ; ; i++) {
      TrafficTestEntity entity = new TrafficTestEntity();
View Full Code Here


    private RemoteCacheManager manager;

    public RemoteCacheManager getCacheContainer() {
        if (manager == null) {
          Configuration configuration = new ConfigurationBuilder().addServers(jdgProperty(DATAGRID_HOST) + ":" + jdgProperty(HOTROD_PORT)).build();
            manager = new RemoteCacheManager(configuration, true);
            log.info("=== Using RemoteCacheManager (Hot Rod) ===");
        }
        return manager;
    }
View Full Code Here

    private RemoteCacheManager cacheManager;
    private RemoteCache<String, Object> cache;

    public FootballManager(Console con) {
        this.con = con;
        Configuration configuration = new ConfigurationBuilder().addServers(jdgProperty(JDG_HOST) + ":" + jdgProperty(HOTROD_PORT)).build();
        cacheManager = new RemoteCacheManager(configuration);
        cache = cacheManager.getCache("teams");
        if(!cache.containsKey(teamsKey)) {
            List<String> teams = new ArrayList<String>();
            Team t = new Team("Lakers");
View Full Code Here

 
  RemoteCache<Object, Object> cache;

  @Before
  public void setup() {
    Configuration configuration = new ConfigurationBuilder().addServers("127.0.0.1:11222").build();
    RemoteCacheManager manager = new RemoteCacheManager(configuration);
    cache = manager.getCache();
  }
View Full Code Here

    @Override
    protected void doStart() throws Exception {
        cacheContainer = configuration.getCacheContainer();
        if (cacheContainer == null) {
            Configuration config = new ConfigurationBuilder().classLoader(Thread.currentThread().getContextClassLoader()).addServers(configuration.getHost()).build();
            cacheContainer = new RemoteCacheManager(config, true);
            isManagedCacheContainer = true;
        }
        super.doStart();
    }
View Full Code Here

    @Override
    protected void doStart() throws Exception {
        cacheContainer = configuration.getCacheContainer();
        if (cacheContainer == null) {
            Configuration config = new ConfigurationBuilder().classLoader(Thread.currentThread().getContextClassLoader()).addServers(configuration.getHost()).build();
            cacheContainer = new RemoteCacheManager(config, true);
            isManagedCacheContainer = true;
        }
        super.doStart();
    }
View Full Code Here

         .pingOnStartup(false)
         .keySizeEstimate(128)
         .valueSizeEstimate(1024)
         .transportFactory(SomeTransportfactory.class);

      Configuration configuration = builder.build();
      validateConfiguration(configuration);

      ConfigurationBuilder newBuilder = new ConfigurationBuilder();
      newBuilder.read(configuration);
      Configuration newConfiguration = newBuilder.build();
      validateConfiguration(newConfiguration);
   }
View Full Code Here

      this.NAME_OF_SHARES = stockName;
      this.sharesTrend = new SharesTrend(stockName, initialValue);
      KEY_DATE_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT"));

      //configure the HotRod client and retrieve the cache
      Configuration config = new ConfigurationBuilder().addServer().host(SERVER_HOST).port(SERVER_PORT).build();
      rcm = new RemoteCacheManager(config);
      cache = rcm.getCache();
   }
View Full Code Here


    public InfinispanRemoteCacheManager(KiWiConfiguration configuration) {
        this.configuration = configuration;

        Configuration remoteCfg = new ConfigurationBuilder()
                .addServer()
                    .host(configuration.getClusterAddress())
                    .port(configuration.getClusterPort())
                .marshaller(new CustomJBossMarshaller())
                .socketTimeout(configuration.getClusterTimeout())
View Full Code Here

TOP

Related Classes of org.infinispan.client.hotrod.configuration.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.