@Test public void testGetInstanceID_Direct() { ClientConfiguration config = createMock(ClientConfiguration.class); mockIdConstruction(config); replay(config); zki = new ZooKeeperInstance(config, zcf); expect(zc.get(Constants.ZROOT + "/" + IID_STRING)).andReturn("yup".getBytes()); replay(zc); assertEquals(IID_STRING, zki.getInstanceID()); }
@Override public String getInstanceID() { if (instanceId == null) { instanceId = ClientContext.getInstanceID(zooCache, instanceName); } ClientContext.verifyInstanceId(zooCache, instanceId, instanceName); return instanceId; }
ZooKeeperInstance implements Instance { @Override public String getInstanceID() { if (instanceId == null) { instanceId = ClientContext.getInstanceID(zooCache, instanceName); } ClientContext.verifyInstanceId(zooCache, instanceId, instanceName); return instanceId; } }
ZooKeeperInstance implements Instance { @Override public String getInstanceID() { if (instanceId == null) { instanceId = ClientContext.getInstanceID(zooCache, instanceName); } ClientContext.verifyInstanceId(zooCache, instanceId, instanceName); return instanceId; } ZooKeeperInstance(String instanceName, String zooKeepers);   ZooKeeperInstance(ClientConfiguration config, ZooCacheFactory zcf);  ZooKeeperInstance(ClientConfiguration config); }
ZooKeeperInstance implements Instance { @Override public String getInstanceID() { if (instanceId == null) { instanceId = ClientContext.getInstanceID(zooCache, instanceName); } ClientContext.verifyInstanceId(zooCache, instanceId, instanceName); return instanceId; } ZooKeeperInstance(String instanceName, String zooKeepers);   ZooKeeperInstance(ClientConfiguration config, ZooCacheFactory zcf);  ZooKeeperInstance(ClientConfiguration config); @Override String getInstanceID(); @Override List<String> getMasterLocations(); @Override String getRootTabletLocation(); @Override String getInstanceName(); @Override String getZooKeepers(); @Override int getZooKeepersSessionTimeOut(); @Override Connector getConnector(String principal, AuthenticationToken token); @Override String toString(); }
ZooKeeperInstance implements Instance { @Override public String getInstanceID() { if (instanceId == null) { instanceId = ClientContext.getInstanceID(zooCache, instanceName); } ClientContext.verifyInstanceId(zooCache, instanceId, instanceName); return instanceId; } ZooKeeperInstance(String instanceName, String zooKeepers);   ZooKeeperInstance(ClientConfiguration config, ZooCacheFactory zcf);  ZooKeeperInstance(ClientConfiguration config); @Override String getInstanceID(); @Override List<String> getMasterLocations(); @Override String getRootTabletLocation(); @Override String getInstanceName(); @Override String getZooKeepers(); @Override int getZooKeepersSessionTimeOut(); @Override Connector getConnector(String principal, AuthenticationToken token); @Override String toString();  }