Examples of RemoteCacheManager


Examples of org.apache.jcs.auxiliary.remote.RemoteCacheManager

            //p("cache monitor running.");
            // Monitor each RemoteCacheManager instance one after the other.
            // Each RemoteCacheManager corresponds to one remote connection.
            for ( Iterator itr = RemoteCacheManager.instances.values().iterator(); itr.hasNext())
            {
                RemoteCacheManager mgr = ( RemoteCacheManager ) itr.next();
                try
                {
                    // If any cache is in error, it strongly suggests all caches managed by the
                    // same RmicCacheManager instance are in error.  So we fix them once and for all.
                    for ( Iterator itr2 = mgr.caches.values().iterator(); itr2.hasNext())
View Full Code Here

Examples of org.apache.stratum.jcs.auxiliary.remote.RemoteCacheManager

            //p("cache monitor running.");
            // Monitor each RemoteCacheManager instance one after the other.
            // Each RemoteCacheManager corresponds to one remote connection.
            for ( Iterator itr = RemoteCacheManager.instances.values().iterator(); itr.hasNext())
            {
                RemoteCacheManager mgr = ( RemoteCacheManager ) itr.next();
                try
                {
                    // If any cache is in error, it strongly suggests all caches managed by the
                    // same RmicCacheManager instance are in error.  So we fix them once and for all.
                    for ( Iterator itr2 = mgr.caches.values().iterator(); itr2.hasNext())
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

    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();
      cache.put(entity.key(), entity.value());
      System.out.println(i);
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

    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

Examples of org.infinispan.client.hotrod.RemoteCacheManager

    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");
            t.addPlayer("Kobe Bryant");
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

  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

Examples of org.infinispan.client.hotrod.RemoteCacheManager

  public static void main(String[] args) throws InterruptedException {

    Properties props = new Properties();
    props.put("infinispan.client.hotrod.server_list", "127.0.0.1:11222");
    RemoteCacheManager cacheManager = new RemoteCacheManager(props);
    RemoteCache<Object, Object> cache = cacheManager.getCache();
   
    for(int i = 0 ; i < 1000000 ; i ++) {
      cache.put("key---" + i, new User(i, "Kylin Soong", "SoftWare Engineer"));
    }
   
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

  public static void main(String[] args) {

    Properties props = new Properties();
    props.put("infinispan.client.hotrod.server_list", "127.0.0.1:11222");
    RemoteCacheManager cacheManager = new RemoteCacheManager(props);
    RemoteCache<Object, Object> cache = cacheManager.getCache();

    System.out.println(cache);

    cache.put("key", new User(1, "Kylin Soong", "IT"));
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

    private BasicCacheContainer manager;

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

Examples of org.infinispan.client.hotrod.RemoteCacheManager

      hotRodServer = TestHelper.startHotRodServer(cacheManager);

      org.infinispan.client.hotrod.configuration.ConfigurationBuilder clientBuilder = new org.infinispan.client.hotrod.configuration.ConfigurationBuilder();
      clientBuilder.addServer().host("127.0.0.1").port(hotRodServer.getPort());
      clientBuilder.marshaller(new ProtoStreamMarshaller());
      remoteCacheManager = new RemoteCacheManager(clientBuilder.build());

      remoteCache = remoteCacheManager.getCache(TEST_CACHE_NAME);

      ObjectName objName = new ObjectName(JMX_DOMAIN + ":type=RemoteQuery,name="
                                                + ObjectName.quote("DefaultCacheManager")
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.