@Test public void testRemoteDistributedResourcePool() { Gson gson = new Gson(); InterpreterResult ret; intp1.interpret("put key1 value1", context); intp2.interpret("put key2 value2", context); ret = intp1.interpret("getAll", context); assertEquals(2, gson.fromJson(ret.message().get(0).getData(), ResourceSet.class).size()); ret = intp2.interpret("getAll", context); assertEquals(2, gson.fromJson(ret.message().get(0).getData(), ResourceSet.class).size()); ret = intp1.interpret("get key1", context); assertEquals("value1", gson.fromJson(ret.message().get(0).getData(), String.class)); ret = intp1.interpret("get key2", context); assertEquals("value2", gson.fromJson(ret.message().get(0).getData(), String.class)); }
@Override public Resource get(String name) { return get(name, true); }
DistributedResourcePool extends LocalResourcePool { @Override public Resource get(String name) { return get(name, true); } }
DistributedResourcePool extends LocalResourcePool { @Override public Resource get(String name) { return get(name, true); } DistributedResourcePool(String id, ResourcePoolConnector connector); }
DistributedResourcePool extends LocalResourcePool { @Override public Resource get(String name) { return get(name, true); } DistributedResourcePool(String id, ResourcePoolConnector connector); @Override Resource get(String name); @Override Resource get(String noteId, String paragraphId, String name); Resource get(String name, boolean remote); Resource get(String noteId, String paragraphId, String name, boolean remote); @Override ResourceSet getAll(); ResourceSet getAll(boolean remote); }
DistributedResourcePool extends LocalResourcePool { @Override public Resource get(String name) { return get(name, true); } DistributedResourcePool(String id, ResourcePoolConnector connector); @Override Resource get(String name); @Override Resource get(String noteId, String paragraphId, String name); Resource get(String name, boolean remote); Resource get(String noteId, String paragraphId, String name, boolean remote); @Override ResourceSet getAll(); ResourceSet getAll(boolean remote);  }