public Object load(LoaderHelper helper) throws CacheLoaderException { return "value" + helper.getArgument(); } public void close() {}
public Object load(LoaderHelper helper) { return "val" + helper.getArgument(); } public void close() {}
public Object load2(LoaderHelper helper) throws CacheLoaderException { Object[] array = (Object[]) helper.getArgument(); assertEquals(one, array[0]); array[0] = two; return value; } };
public Object load2(LoaderHelper helper) throws CacheLoaderException { Object[] array = (Object[]) helper.getArgument(); assertEquals(one, array[0]); array[0] = two; return value; } };
public Object load2(LoaderHelper helper) { if (helper.getArgument() instanceof Integer) { try { Thread.sleep(((Integer) helper.getArgument()).intValue()); } catch (InterruptedException ugh) { fail("interrupted"); } } return helper.getKey(); }
@Override public Object load2(LoaderHelper helper) { if (helper.getArgument() instanceof Integer) { try { Thread.sleep(((Integer) helper.getArgument()).intValue()); } catch (InterruptedException ugh) { fail("interrupted"); } } Object ret = helper.getKey(); if( ret instanceof String) { if(ret != null && ret.equals(NON_EXISTENT_KEY)) return null;//return null } return ret; }
public Object load(LoaderHelper helper) throws CacheLoaderException { CapConTest testInstance = (CapConTest)helper.getArgument(); if (testInstance == null) { throw new TestException("Unexpected callback object " + testInstance + ", callback for previous call to loader is " + previousTestInstance); } previousTestInstance = testInstance; Object anObj = testInstance.getNewValue(); return anObj; }
public Object load2(LoaderHelper helper) throws CacheLoaderException { assertEquals(key, helper.getKey()); assertEquals(name, helper.getRegion().getName()); try { RegionAttributes attrs = helper.getRegion().getAttributes(); if (attrs.getScope().isDistributed()) { assertNull(helper.netSearch(false)); assertNull(helper.netSearch(true)); } } catch (TimeoutException ex) { fail("Why did I time out?", ex); } Object argument = helper.getArgument(); if (argument != null) { if (argument.equals(exception)) { String s = "Test Exception"; throw new CacheLoaderException(s); } else { assertEquals(arg, argument); } } return value; } };
Assert.assertTrue(o != Token.INVALID && o != Token.LOCAL_INVALID); NetLoadReplyMessage.sendMessage(NetLoadRequestMessage.this.getSender(), processorId, o,dm,loaderHelper.getArgument(),null,false, false);
Assert.assertTrue(o != Token.INVALID && o != Token.LOCAL_INVALID); NetLoadReplyMessage.sendMessage(NetLoadRequestMessage.this.getSender(), processorId, o,dm,loaderHelper.getArgument(),null,false, false);