public static MethodCall of(String methodName) { return new MethodCall(methodName); } }
/** * Return the BackgroundExecutor. * * Typically for testing we either want these to run immediately or not at all. * Defaults to use ImmediateBackgroundExecutor, use IgnoreBackgroundExecutor if desired. */ @Override public BackgroundExecutor getBackgroundExecutor() { methodCalls.add(MethodCall.of("getBackgroundExecutor")); return backgroundExecutor; }
/** * Add the two arguments. */ public MethodCall with(String name1, Object arg1, String name2, Object arg2) { return with(name1, arg1, name2, arg2, null, null); }
@Override public ServerCacheManager getServerCacheManager() { methodCalls.add(MethodCall.of("getServerCacheManager")); return delegate.getServerCacheManager(); }
/** * Add the single argument. */ public MethodCall with(String name1, Object arg1) { return with(name1, arg1, null, null, null, null); }
@Override public void externalModification(String tableName, boolean inserted, boolean updated, boolean deleted) { methodCalls.add(MethodCall.of("externalModification") .with("tableName", tableName) .with("inserted", inserted, "updated", updated, "deleted", deleted)); if (persistBulkUpdates) { bulkUpdate.externalModification(tableName, inserted, updated, deleted); } }
@Override public Transaction createTransaction() { methodCalls.add(MethodCall.of("createTransaction")); return delegate.createTransaction(); }
/** * Add three arguments. */ public MethodCall with(String name1, Object arg1, String name2, Object arg2, String name3, Object arg3) { return with(name1, arg1, name2, arg2, name3, arg3, null, null); }
@Override public Transaction currentTransaction() { methodCalls.add(MethodCall.of("currentTransaction")); return delegate.currentTransaction(); }
@Override public AutoTune getAutoTune() { methodCalls.add(MethodCall.of("getAutoTune")); return delegate.getAutoTune(); }
@Override public String getName() { methodCalls.add(MethodCall.of("getName")); return delegate.getName(); }
@Override public void commitTransaction() { methodCalls.add(MethodCall.of("commitTransaction")); delegate.commitTransaction(); }
@Override public MetaInfoManager getMetaInfoManager() { methodCalls.add(MethodCall.of("getMetaInfoManager")); return delegate.getMetaInfoManager(); }