public void testLocalOnlyPut() { localOnlyPut(this.<Integer, String>cache(0), 1, "v1"); localOnlyPut(this.<Integer, String>cache(1), 2, "v2"); localOnlyPut(this.<Integer, String>cache(2), 3, "v3"); localOnlyPut(this.<Integer, String>cache(3), 4, "v4"); }
@Override public Object visitCommitCommand(TxInvocationContext ctx, CommitCommand command) throws Throwable { blockIfNeeded(); return invokeNextInterceptor(ctx, command); }
@Override public Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand command) throws Throwable { try { return invokeNextInterceptor(ctx, command); } finally { notifyPrepareProcessed(); } }
public void testGenerateVersion() { NumericVersionGenerator vg = new NumericVersionGenerator().clustered(true); vg.resetCounter(); TestAddress addr1 = new TestAddress(1); TestAddress addr2 = new TestAddress(2); TestAddress addr3 = new TestAddress(1); List<Address> members = Arrays.asList((Address)addr1, addr2, addr3); vg.calculateRank(addr2, members, 1); assertEquals(new NumericVersion(0x1000200000001L), vg.generateNew()); assertEquals(new NumericVersion(0x1000200000002L), vg.generateNew()); assertEquals(new NumericVersion(0x1000200000003L), vg.generateNew()); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder dcc = getConfig(); createCluster(dcc, 2); waitForClusterToForm(); }
public final void testRemoveIgnoreReturnValueOnNonExistingKey() throws Exception { doIgnoreReturnValueTest(true, Operation.REMOVE, false); }
@Override public Object[] factory() { return new Object[] { new VersionedReplStateTransferTest().totalOrder(false), new VersionedReplStateTransferTest().totalOrder(true) }; }
private ReorderResponsesRpcManager injectReorderResponseRpcManager(Cache toInject, Cache lastResponse) { RpcManager rpcManager = TestingUtil.extractComponent(toInject, RpcManager.class); ReorderResponsesRpcManager newRpcManager = new ReorderResponsesRpcManager(address(lastResponse), rpcManager); TestingUtil.replaceComponent(toInject, RpcManager.class, newRpcManager, true); return newRpcManager; }
public final void testPutFailWriteSkewWithPassivationOnNonOwner() throws Exception { doTestWriteSkewWithPassivation(false, Operation.PUT, true); }
public final void testIgnorePreviousValueAndReadOnPrimary() throws Exception { doTestIgnoreReturnValueAndRead(false); }
public final void testRemoveIgnoreReturnValueNonExistingKey() throws Exception { doIgnoreReturnValueTest(true, Operation.REMOVE, true); }
public final void testRemoveFailWriteSkewWithPassivationOnNonOwner() throws Exception { doTestWriteSkewWithPassivation(false, Operation.REMOVE, true); }
public final void testIgnorePreviousValueAndReadOnNonOwner() throws Exception { doTestIgnoreReturnValueAndRead(true); }
public final void testRemoveIgnoreReturnValueNonExistingKeyOnNonOwner() throws Exception { doIgnoreReturnValueTest(false, Operation.REMOVE, true); }
public final void testConditionalReplaceFailWriteSkewWithPassivation() throws Exception { doTestWriteSkewWithPassivation(true, Operation.CONDITIONAL_REPLACE, true); }
public final void testReplaceIgnoreReturnValueOnNonExistingKey() throws Exception { doIgnoreReturnValueTest(true, Operation.REPLACE, false); }
public final void testReplaceIgnoreReturnValueNonExistingKey() throws Exception { doIgnoreReturnValueTest(true, Operation.REPLACE, true); }
public final void testReplaceIgnoreReturnValueNonExistingKeyOnNonOwner() throws Exception { doIgnoreReturnValueTest(false, Operation.REPLACE, true); }
public final void testConditionalRemoveIgnoreReturnValueNonExistingKey() throws Exception { doIgnoreReturnValueTest(true, Operation.CONDITIONAL_REMOVE, true); }
public final void testConditionalReplaceIgnoreReturnValueNonExistingKey() throws Exception { doIgnoreReturnValueTest(true, Operation.CONDITIONAL_REPLACE, true); }