Examples of DistributedSystem


Examples of com.gemstone.gemfire.distributed.DistributedSystem

      }
      if (searchTimeout != null) {
        cache.setSearchTimeout(searchTimeout);
      }

      DistributedSystem system = cache.getDistributedSystem();

      DistributedMember member = system.getDistributedMember();

      log.info(String.format("Connected to Distributed System [%1$s] as Member [%2$s] in Groups [%3$s] with Roles [%4$s] on Host [%5$s] having PID [%6$d].",
        system.getName(), member.getId(), member.getGroups(), member.getRoles(), member.getHost(), member.getProcessId()));

      log.info(String.format("%1$s GemFire v.%2$s Cache [%3$s].", messagePrefix, CacheFactory.getVersion(),
        cache.getName()));

      // load/init cache.xml
View Full Code Here

Examples of com.gemstone.gemfire.distributed.DistributedSystem

    }
    catch (Exception ignore) {
    }

    if (instance == null) {
      DistributedSystem ds = DistributedSystem.connect(new Properties());
      instance = CacheFactory.create(ds);
    }

    Region region = instance.getRegion(CACHE_NAME);
View Full Code Here

Examples of com.gemstone.gemfire.distributed.DistributedSystem

  public void setSearchTimeout(int arg0) {
    this.searchTimeout = arg0;
  }

  DistributedSystem mockDistributedSystem() {
    DistributedSystem mockDistributedSystem = mock(DistributedSystem.class);

    when(mockDistributedSystem.getName()).thenAnswer(new Answer<String>() {
      @Override
      public String answer(InvocationOnMock invocation) throws Throwable {
        return getName();
      }
    });

    when(mockDistributedSystem.getProperties()).thenReturn(this.properties);

    DistributedMember mockDistributedMember = mockDistributedMember();

    when(mockDistributedSystem.getDistributedMember()).thenReturn(mockDistributedMember);

    return mockDistributedSystem;
  }
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.