Search in sources :

Example 1 with Response

use of cz.o2.proxima.transaction.Response in project proxima-platform by O2-Czech-Republic.

the class TransactionIT method swapValueBetween.

private boolean swapValueBetween(String key, String attrA, String attrB, boolean canFailWrite) throws InterruptedException {
    long retrySleep = 1;
    do {
        String transactionId = UUID.randomUUID().toString();
        BlockingQueue<Response> responses = new ArrayBlockingQueue<>(1);
        Optional<KeyValue<byte[]>> valA = view.get(key, attrA, device);
        Optional<KeyValue<byte[]>> valB = view.get(key, attrB, device);
        final List<KeyAttribute> fetched = Arrays.asList(valA.isPresent() ? KeyAttributes.ofStreamElement(valA.get()) : KeyAttributes.ofMissingAttribute(user, key, device, device.extractSuffix(attrA)), valB.isPresent() ? KeyAttributes.ofStreamElement(valB.get()) : KeyAttributes.ofMissingAttribute(user, key, device, device.extractSuffix(attrB)));
        client.begin(transactionId, (id, resp) -> ExceptionUtils.unchecked(() -> responses.put(resp)), fetched);
        Response response = responses.take();
        if (response.getFlags() != Flags.OPEN) {
            ;
            TimeUnit.MILLISECONDS.sleep(Math.min(8, retrySleep *= 2));
            continue;
        }
        long sequentialId = response.getSeqId();
        final List<StreamElement> updates;
        if (valA.isPresent()) {
            int currentVal = ByteBuffer.wrap(valA.get().getParsedRequired()).getInt();
            updates = updateAttributeAndRemove(sequentialId, key, attrB, attrA, currentVal);
        } else {
            int currentVal = ByteBuffer.wrap(valB.get().getParsedRequired()).getInt();
            updates = updateAttributeAndRemove(sequentialId, key, attrA, attrB, currentVal);
        }
        client.commit(transactionId, updates.stream().map(KeyAttributes::ofStreamElement).collect(Collectors.toList()));
        response = responses.take();
        if (response.getFlags() != Flags.COMMITTED) {
            TimeUnit.MILLISECONDS.sleep(Math.min(8, retrySleep *= 2));
            continue;
        }
        CountDownLatch latch = new CountDownLatch(1);
        AtomicBoolean succeeded = new AtomicBoolean();
        CommitCallback callback = (succ, exc) -> {
            if (!succ) {
                client.rollback(transactionId);
            }
            succeeded.set(succ);
            latch.countDown();
        };
        if (canFailWrite && random.nextBoolean()) {
            callback.commit(false, new RuntimeException("Failed!"));
        } else {
            CommitCallback multiCallback = CommitCallback.afterNumCommits(updates.size(), callback);
            updates.forEach(u -> view.write(u, multiCallback));
        }
        latch.await();
        return succeeded.get();
    } while (true);
}
Also used : Arrays(java.util.Arrays) Transaction(cz.o2.proxima.direct.transaction.TransactionalOnlineAttributeWriter.Transaction) ConfigConstants(cz.o2.proxima.repository.ConfigConstants) EntityDescriptor(cz.o2.proxima.repository.EntityDescriptor) Random(java.util.Random) ByteBuffer(java.nio.ByteBuffer) Wildcard(cz.o2.proxima.repository.EntityAwareAttributeDescriptor.Wildcard) ExceptionUtils(cz.o2.proxima.util.ExceptionUtils) CachedView(cz.o2.proxima.direct.view.CachedView) StreamElement(cz.o2.proxima.storage.StreamElement) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) TransformationRunner(cz.o2.proxima.util.TransformationRunner) Map(java.util.Map) After(org.junit.After) TransactionResourceManager(cz.o2.proxima.direct.transaction.TransactionResourceManager) Optionals(cz.o2.proxima.util.Optionals) Flags(cz.o2.proxima.transaction.Response.Flags) BlockingQueue(java.util.concurrent.BlockingQueue) ObserveHandle(cz.o2.proxima.direct.commitlog.ObserveHandle) UUID(java.util.UUID) CommitCallback(cz.o2.proxima.direct.core.CommitCallback) Collectors(java.util.stream.Collectors) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) KeyValue(cz.o2.proxima.direct.randomaccess.KeyValue) Response(cz.o2.proxima.transaction.Response) Optional(java.util.Optional) DirectDataOperator(cz.o2.proxima.direct.core.DirectDataOperator) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) OnlineAttributeWriter(cz.o2.proxima.direct.core.OnlineAttributeWriter) AtomicReference(java.util.concurrent.atomic.AtomicReference) ArrayList(java.util.ArrayList) ClientTransactionManager(cz.o2.proxima.direct.transaction.ClientTransactionManager) Regular(cz.o2.proxima.repository.EntityAwareAttributeDescriptor.Regular) ConfigFactory(com.typesafe.config.ConfigFactory) ExecutorService(java.util.concurrent.ExecutorService) DeclaredThreadSafe(cz.o2.proxima.annotations.DeclaredThreadSafe) TransactionalOnlineAttributeWriter(cz.o2.proxima.direct.transaction.TransactionalOnlineAttributeWriter) Before(org.junit.Before) Repository(cz.o2.proxima.repository.Repository) Config(com.typesafe.config.Config) Assert.assertTrue(org.junit.Assert.assertTrue) KeyAttribute(cz.o2.proxima.transaction.KeyAttribute) KeyAttributes(cz.o2.proxima.transaction.KeyAttributes) Test(org.junit.Test) TimeUnit(java.util.concurrent.TimeUnit) TransactionRejectedException(cz.o2.proxima.direct.transaction.TransactionalOnlineAttributeWriter.TransactionRejectedException) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) KeyValue(cz.o2.proxima.direct.randomaccess.KeyValue) KeyAttributes(cz.o2.proxima.transaction.KeyAttributes) StreamElement(cz.o2.proxima.storage.StreamElement) KeyAttribute(cz.o2.proxima.transaction.KeyAttribute) CommitCallback(cz.o2.proxima.direct.core.CommitCallback) CountDownLatch(java.util.concurrent.CountDownLatch) Response(cz.o2.proxima.transaction.Response) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue)

Example 2 with Response

use of cz.o2.proxima.transaction.Response in project proxima-platform by O2-Czech-Republic.

the class TransactionIT_Large method swapValueBetween.

private boolean swapValueBetween(String key, String attrA, String attrB, boolean canFailWrite) throws InterruptedException {
    long retrySleep = 1;
    do {
        String transactionId = UUID.randomUUID().toString();
        BlockingQueue<Response> responses = new ArrayBlockingQueue<>(1);
        Optional<KeyValue<byte[]>> valA = view.get(key, attrA, device);
        Optional<KeyValue<byte[]>> valB = view.get(key, attrB, device);
        final List<KeyAttribute> fetched = Arrays.asList(valA.isPresent() ? KeyAttributes.ofStreamElement(valA.get()) : KeyAttributes.ofMissingAttribute(user, key, device, device.extractSuffix(attrA)), valB.isPresent() ? KeyAttributes.ofStreamElement(valB.get()) : KeyAttributes.ofMissingAttribute(user, key, device, device.extractSuffix(attrB)));
        client.begin(transactionId, (id, resp) -> ExceptionUtils.unchecked(() -> responses.put(resp)), fetched);
        Response response = responses.take();
        if (response.getFlags() != Flags.OPEN) {
            ;
            TimeUnit.MILLISECONDS.sleep(Math.min(8, retrySleep *= 2));
            continue;
        }
        long sequentialId = response.getSeqId();
        final List<StreamElement> updates;
        if (valA.isPresent()) {
            int currentVal = ByteBuffer.wrap(valA.get().getParsedRequired()).getInt();
            updates = updateAttributeAndRemove(sequentialId, key, attrB, attrA, currentVal);
        } else {
            int currentVal = ByteBuffer.wrap(valB.get().getParsedRequired()).getInt();
            updates = updateAttributeAndRemove(sequentialId, key, attrA, attrB, currentVal);
        }
        client.commit(transactionId, updates.stream().map(KeyAttributes::ofStreamElement).collect(Collectors.toList()));
        response = responses.take();
        if (response.getFlags() != Flags.COMMITTED) {
            TimeUnit.MILLISECONDS.sleep(Math.min(8, retrySleep *= 2));
            continue;
        }
        CountDownLatch latch = new CountDownLatch(1);
        AtomicBoolean succeeded = new AtomicBoolean();
        CommitCallback callback = (succ, exc) -> {
            if (!succ) {
                client.rollback(transactionId);
            }
            succeeded.set(succ);
            latch.countDown();
        };
        if (canFailWrite && random.nextBoolean()) {
            callback.commit(false, new RuntimeException("Failed!"));
        } else {
            CommitCallback multiCallback = CommitCallback.afterNumCommits(updates.size(), callback);
            updates.forEach(u -> view.write(u, multiCallback));
        }
        latch.await();
        return succeeded.get();
    } while (true);
}
Also used : Arrays(java.util.Arrays) Transaction(cz.o2.proxima.direct.transaction.TransactionalOnlineAttributeWriter.Transaction) ConfigConstants(cz.o2.proxima.repository.ConfigConstants) EntityDescriptor(cz.o2.proxima.repository.EntityDescriptor) Random(java.util.Random) ByteBuffer(java.nio.ByteBuffer) Wildcard(cz.o2.proxima.repository.EntityAwareAttributeDescriptor.Wildcard) ExceptionUtils(cz.o2.proxima.util.ExceptionUtils) CachedView(cz.o2.proxima.direct.view.CachedView) StreamElement(cz.o2.proxima.storage.StreamElement) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) TransformationRunner(cz.o2.proxima.util.TransformationRunner) Map(java.util.Map) After(org.junit.After) TransactionResourceManager(cz.o2.proxima.direct.transaction.TransactionResourceManager) Optionals(cz.o2.proxima.util.Optionals) Flags(cz.o2.proxima.transaction.Response.Flags) BlockingQueue(java.util.concurrent.BlockingQueue) ObserveHandle(cz.o2.proxima.direct.commitlog.ObserveHandle) UUID(java.util.UUID) CommitCallback(cz.o2.proxima.direct.core.CommitCallback) Collectors(java.util.stream.Collectors) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) KeyValue(cz.o2.proxima.direct.randomaccess.KeyValue) Response(cz.o2.proxima.transaction.Response) Optional(java.util.Optional) DirectDataOperator(cz.o2.proxima.direct.core.DirectDataOperator) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) OnlineAttributeWriter(cz.o2.proxima.direct.core.OnlineAttributeWriter) AtomicReference(java.util.concurrent.atomic.AtomicReference) ArrayList(java.util.ArrayList) ClientTransactionManager(cz.o2.proxima.direct.transaction.ClientTransactionManager) Regular(cz.o2.proxima.repository.EntityAwareAttributeDescriptor.Regular) ConfigFactory(com.typesafe.config.ConfigFactory) ExecutorService(java.util.concurrent.ExecutorService) DeclaredThreadSafe(cz.o2.proxima.annotations.DeclaredThreadSafe) TransactionalOnlineAttributeWriter(cz.o2.proxima.direct.transaction.TransactionalOnlineAttributeWriter) Before(org.junit.Before) Repository(cz.o2.proxima.repository.Repository) Config(com.typesafe.config.Config) Assert.assertTrue(org.junit.Assert.assertTrue) KeyAttribute(cz.o2.proxima.transaction.KeyAttribute) KeyAttributes(cz.o2.proxima.transaction.KeyAttributes) Test(org.junit.Test) TimeUnit(java.util.concurrent.TimeUnit) TransactionRejectedException(cz.o2.proxima.direct.transaction.TransactionalOnlineAttributeWriter.TransactionRejectedException) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) KeyValue(cz.o2.proxima.direct.randomaccess.KeyValue) KeyAttributes(cz.o2.proxima.transaction.KeyAttributes) StreamElement(cz.o2.proxima.storage.StreamElement) KeyAttribute(cz.o2.proxima.transaction.KeyAttribute) CommitCallback(cz.o2.proxima.direct.core.CommitCallback) CountDownLatch(java.util.concurrent.CountDownLatch) Response(cz.o2.proxima.transaction.Response) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue)

Example 3 with Response

use of cz.o2.proxima.transaction.Response in project proxima-platform by O2-Czech-Republic.

the class TransactionLogObserverTest method testCreateTransactionCommitAfterFailover.

@Test(timeout = 10000)
public void testCreateTransactionCommitAfterFailover() throws InterruptedException {
    String transactionId = UUID.randomUUID().toString();
    BlockingQueue<Pair<String, Response>> responseQueue = new ArrayBlockingQueue<>(1);
    try (ClientTransactionManager clientManager = new TransactionResourceManager(direct, Collections.emptyMap())) {
        createObserver();
        clientManager.begin(transactionId, ExceptionUtils.uncheckedBiConsumer((k, v) -> responseQueue.put(Pair.of(k, v))), Collections.singletonList(KeyAttributes.ofAttributeDescriptor(user, "user", userGateways, 1L, "1")));
        takeResponseFor(responseQueue, "open.1");
        observer.getRawManager().close();
        createObserver();
        clientManager.commit(transactionId, Collections.singletonList(KeyAttributes.ofAttributeDescriptor(user, "user", userGateways, 2L, "1")));
        Pair<String, Response> response = takeResponseFor(responseQueue, "commit");
        assertEquals(Response.Flags.COMMITTED, response.getSecond().getFlags());
    }
}
Also used : Iterables(com.google.common.collect.Iterables) ServerTransactionManager(cz.o2.proxima.direct.transaction.ServerTransactionManager) EntityDescriptor(cz.o2.proxima.repository.EntityDescriptor) ConfigUtils(cz.o2.proxima.repository.config.ConfigUtils) Wildcard(cz.o2.proxima.repository.EntityAwareAttributeDescriptor.Wildcard) ExceptionUtils(cz.o2.proxima.util.ExceptionUtils) Lists(com.google.common.collect.Lists) ClientTransactionManager(cz.o2.proxima.direct.transaction.ClientTransactionManager) StreamElement(cz.o2.proxima.storage.StreamElement) Pair(cz.o2.proxima.util.Pair) TransformationRunner(cz.o2.proxima.util.TransformationRunner) After(org.junit.After) TransactionResourceManager(cz.o2.proxima.direct.transaction.TransactionResourceManager) ConfigFactory(com.typesafe.config.ConfigFactory) URI(java.net.URI) Before(org.junit.Before) Repository(cz.o2.proxima.repository.Repository) Config(com.typesafe.config.Config) Request(cz.o2.proxima.transaction.Request) AttributeDescriptor(cz.o2.proxima.repository.AttributeDescriptor) KeyAttribute(cz.o2.proxima.transaction.KeyAttribute) Set(java.util.Set) KeyAttributes(cz.o2.proxima.transaction.KeyAttributes) BlockingQueue(java.util.concurrent.BlockingQueue) Test(org.junit.Test) UUID(java.util.UUID) Sets(com.google.common.collect.Sets) TimeUnit(java.util.concurrent.TimeUnit) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) AtomicLong(java.util.concurrent.atomic.AtomicLong) List(java.util.List) Response(cz.o2.proxima.transaction.Response) State(cz.o2.proxima.transaction.State) DirectDataOperator(cz.o2.proxima.direct.core.DirectDataOperator) Assert(org.junit.Assert) Collections(java.util.Collections) Response(cz.o2.proxima.transaction.Response) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) ClientTransactionManager(cz.o2.proxima.direct.transaction.ClientTransactionManager) TransactionResourceManager(cz.o2.proxima.direct.transaction.TransactionResourceManager) Pair(cz.o2.proxima.util.Pair) Test(org.junit.Test)

Example 4 with Response

use of cz.o2.proxima.transaction.Response in project proxima-platform by O2-Czech-Republic.

the class TransactionLogObserverTest method testCreateTransactionRollbackAfterFailover.

@Test(timeout = 10000)
public void testCreateTransactionRollbackAfterFailover() throws InterruptedException {
    String t1 = "t1-" + UUID.randomUUID();
    String t2 = "t2-" + UUID.randomUUID();
    BlockingQueue<Pair<String, Response>> responseQueue = new ArrayBlockingQueue<>(1);
    try (ClientTransactionManager clientManager = new TransactionResourceManager(direct, Collections.emptyMap())) {
        createObserver();
        clientManager.begin(t1, ExceptionUtils.uncheckedBiConsumer((k, v) -> responseQueue.put(Pair.of(k, v))), Collections.singletonList(KeyAttributes.ofAttributeDescriptor(user, "user", userGateways, 1L, "1")));
        Pair<String, Response> t1openResponse = takeResponseFor(responseQueue, "open.1");
        clientManager.begin(t2, ExceptionUtils.uncheckedBiConsumer((k, v) -> responseQueue.put(Pair.of(k, v))), Collections.singletonList(KeyAttributes.ofAttributeDescriptor(user, "user", userGateways, 1L, "1")));
        Pair<String, Response> t2openResponse = takeResponseFor(responseQueue, "open.1");
        assertTrue(t2openResponse.getSecond().getSeqId() > t1openResponse.getSecond().getSeqId());
        clientManager.commit(t2, Collections.singletonList(KeyAttributes.ofAttributeDescriptor(user, "user", userGateways, 2L, "1")));
        Pair<String, Response> t2commitResponse = takeResponseFor(responseQueue, "commit");
        assertEquals("commit", t2commitResponse.getFirst());
        observer.getRawManager().close();
        createObserver();
        clientManager.commit(t1, Collections.singletonList(KeyAttributes.ofAttributeDescriptor(user, "user", userGateways, 2L, "1")));
        Pair<String, Response> response = takeResponseFor(responseQueue, "commit");
        assertTrue("Expected exactly one committed transaction, got " + t2commitResponse.getSecond() + " and " + response.getSecond(), t2commitResponse.getSecond().getFlags() == Response.Flags.COMMITTED ^ response.getSecond().getFlags() == Response.Flags.COMMITTED);
        tearDown();
    }
}
Also used : Iterables(com.google.common.collect.Iterables) ServerTransactionManager(cz.o2.proxima.direct.transaction.ServerTransactionManager) EntityDescriptor(cz.o2.proxima.repository.EntityDescriptor) ConfigUtils(cz.o2.proxima.repository.config.ConfigUtils) Wildcard(cz.o2.proxima.repository.EntityAwareAttributeDescriptor.Wildcard) ExceptionUtils(cz.o2.proxima.util.ExceptionUtils) Lists(com.google.common.collect.Lists) ClientTransactionManager(cz.o2.proxima.direct.transaction.ClientTransactionManager) StreamElement(cz.o2.proxima.storage.StreamElement) Pair(cz.o2.proxima.util.Pair) TransformationRunner(cz.o2.proxima.util.TransformationRunner) After(org.junit.After) TransactionResourceManager(cz.o2.proxima.direct.transaction.TransactionResourceManager) ConfigFactory(com.typesafe.config.ConfigFactory) URI(java.net.URI) Before(org.junit.Before) Repository(cz.o2.proxima.repository.Repository) Config(com.typesafe.config.Config) Request(cz.o2.proxima.transaction.Request) AttributeDescriptor(cz.o2.proxima.repository.AttributeDescriptor) KeyAttribute(cz.o2.proxima.transaction.KeyAttribute) Set(java.util.Set) KeyAttributes(cz.o2.proxima.transaction.KeyAttributes) BlockingQueue(java.util.concurrent.BlockingQueue) Test(org.junit.Test) UUID(java.util.UUID) Sets(com.google.common.collect.Sets) TimeUnit(java.util.concurrent.TimeUnit) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) AtomicLong(java.util.concurrent.atomic.AtomicLong) List(java.util.List) Response(cz.o2.proxima.transaction.Response) State(cz.o2.proxima.transaction.State) DirectDataOperator(cz.o2.proxima.direct.core.DirectDataOperator) Assert(org.junit.Assert) Collections(java.util.Collections) Response(cz.o2.proxima.transaction.Response) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) ClientTransactionManager(cz.o2.proxima.direct.transaction.ClientTransactionManager) TransactionResourceManager(cz.o2.proxima.direct.transaction.TransactionResourceManager) Pair(cz.o2.proxima.util.Pair) Test(org.junit.Test)

Example 5 with Response

use of cz.o2.proxima.transaction.Response in project proxima-platform by O2-Czech-Republic.

the class TransactionLogObserverTest method testCreateTransactionRollbackRollback.

@Test(timeout = 10000)
public void testCreateTransactionRollbackRollback() throws InterruptedException {
    createObserver();
    try (ClientTransactionManager clientManager = direct.getClientTransactionManager()) {
        String transactionId = UUID.randomUUID().toString();
        BlockingQueue<Pair<String, Response>> responseQueue = new ArrayBlockingQueue<>(1);
        clientManager.begin(transactionId, ExceptionUtils.uncheckedBiConsumer((k, v) -> responseQueue.put(Pair.of(k, v))), Collections.singletonList(KeyAttributes.ofAttributeDescriptor(user, "user", userGateways, 1L, "1")));
        responseQueue.take();
        clientManager.rollback(transactionId);
        Pair<String, Response> rollbackResponse1 = responseQueue.take();
        assertEquals(Response.Flags.ABORTED, rollbackResponse1.getSecond().getFlags());
        clientManager.rollback(transactionId);
        Pair<String, Response> rollbackResponse2 = responseQueue.take();
        assertEquals(Response.Flags.ABORTED, rollbackResponse2.getSecond().getFlags());
    }
}
Also used : Iterables(com.google.common.collect.Iterables) ServerTransactionManager(cz.o2.proxima.direct.transaction.ServerTransactionManager) EntityDescriptor(cz.o2.proxima.repository.EntityDescriptor) ConfigUtils(cz.o2.proxima.repository.config.ConfigUtils) Wildcard(cz.o2.proxima.repository.EntityAwareAttributeDescriptor.Wildcard) ExceptionUtils(cz.o2.proxima.util.ExceptionUtils) Lists(com.google.common.collect.Lists) ClientTransactionManager(cz.o2.proxima.direct.transaction.ClientTransactionManager) StreamElement(cz.o2.proxima.storage.StreamElement) Pair(cz.o2.proxima.util.Pair) TransformationRunner(cz.o2.proxima.util.TransformationRunner) After(org.junit.After) TransactionResourceManager(cz.o2.proxima.direct.transaction.TransactionResourceManager) ConfigFactory(com.typesafe.config.ConfigFactory) URI(java.net.URI) Before(org.junit.Before) Repository(cz.o2.proxima.repository.Repository) Config(com.typesafe.config.Config) Request(cz.o2.proxima.transaction.Request) AttributeDescriptor(cz.o2.proxima.repository.AttributeDescriptor) KeyAttribute(cz.o2.proxima.transaction.KeyAttribute) Set(java.util.Set) KeyAttributes(cz.o2.proxima.transaction.KeyAttributes) BlockingQueue(java.util.concurrent.BlockingQueue) Test(org.junit.Test) UUID(java.util.UUID) Sets(com.google.common.collect.Sets) TimeUnit(java.util.concurrent.TimeUnit) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) AtomicLong(java.util.concurrent.atomic.AtomicLong) List(java.util.List) Response(cz.o2.proxima.transaction.Response) State(cz.o2.proxima.transaction.State) DirectDataOperator(cz.o2.proxima.direct.core.DirectDataOperator) Assert(org.junit.Assert) Collections(java.util.Collections) Response(cz.o2.proxima.transaction.Response) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) ClientTransactionManager(cz.o2.proxima.direct.transaction.ClientTransactionManager) Pair(cz.o2.proxima.util.Pair) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)40 EntityDescriptor (cz.o2.proxima.repository.EntityDescriptor)33 StreamElement (cz.o2.proxima.storage.StreamElement)25 Response (cz.o2.proxima.transaction.Response)24 KeyAttribute (cz.o2.proxima.transaction.KeyAttribute)22 State (cz.o2.proxima.transaction.State)22 ArrayList (java.util.ArrayList)22 Before (org.junit.Before)22 ConfigFactory (com.typesafe.config.ConfigFactory)21 Repository (cz.o2.proxima.repository.Repository)21 KeyAttributes (cz.o2.proxima.transaction.KeyAttributes)21 Request (cz.o2.proxima.transaction.Request)21 Pair (cz.o2.proxima.util.Pair)21 Collections (java.util.Collections)21 List (java.util.List)21 UUID (java.util.UUID)21 ArrayBlockingQueue (java.util.concurrent.ArrayBlockingQueue)21 DirectDataOperator (cz.o2.proxima.direct.core.DirectDataOperator)20 Wildcard (cz.o2.proxima.repository.EntityAwareAttributeDescriptor.Wildcard)20 ExceptionUtils (cz.o2.proxima.util.ExceptionUtils)20