Package co.paralleluniverse.strands

Examples of co.paralleluniverse.strands.SuspendableRunnable


        }).start().join();
    }
   
    @Test
    public void testExplainAggregateQueryFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    Document explain = addListenerCalledFlagSetter(mongoColl.explainAsync(AGGREGATE_QUERY.build())).get();
                    assertNotNull(explain.get(FIELD_AGGREGATE_RESULT_STAGES_NAME));
View Full Code Here


        }).start().join();
    }

    @Test
    public void testExplainAggregateBuilderFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    Document explain = addListenerCalledFlagSetter(mongoColl.explainAsync(AGGREGATE_QUERY)).get();
                    assertNotNull(explain.get(FIELD_AGGREGATE_RESULT_STAGES_NAME));
View Full Code Here

        }).start().join();
    }

    @Test
    public void testExplainFindQueryFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    Document explain = addListenerCalledFlagSetter(mongoColl.explainAsync(Find.builder().query(FIND_DOCUMENT).build())).get();
                    assertNotNull(explain.get(FIELD_AGGREGATE_RESULT_CURSOR_NAME));
View Full Code Here

        }).start().join();
    }

    @Test
    public void testExplainFindBuilderFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    Document explain = addListenerCalledFlagSetter(mongoColl.explainAsync(Find.builder().query(FIND_DOCUMENT))).get();
                    assertNotNull(explain.get(FIELD_AGGREGATE_RESULT_CURSOR_NAME));
View Full Code Here

        }).start().join();
    }
   
    @Test
    public void testFindQueryDocument() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                MongoIterator<Document> find = mongoColl.find(FIND_DOCUMENT);
                assertTrue(find.hasNext());
            }
View Full Code Here

        }).start().join();
    }

    @Test
    public void testFindQuery() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                MongoIterator<Document> find = mongoColl.find(Find.builder().query(FIND_DOCUMENT).build());
                assertTrue(find.hasNext());
            }
View Full Code Here

        }).start().join();
    }

    @Test
    public void testFindBuilder() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                MongoIterator<Document> find = mongoColl.find(Find.builder().query(FIND_DOCUMENT));
                assertTrue(find.hasNext());
            }
View Full Code Here

        }).start().join();
    }

    @Test
    public void testFindQueryFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    MongoIterator<Document> find = addListenerCalledFlagSetter(mongoColl.findAsync(Find.builder().query(FIND_DOCUMENT).build())).get();
                    assertTrue(find.hasNext());
View Full Code Here

        }).start().join();
    }

    @Test
    public void testFindQueryDocumentFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    MongoIterator<Document> find = addListenerCalledFlagSetter(mongoColl.findAsync(FIND_DOCUMENT)).get();
                    assertTrue(find.hasNext());
View Full Code Here

        }).start().join();
    }

    @Test
    public void testFindBuilderFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    MongoIterator<Document> find = addListenerCalledFlagSetter(mongoColl.findAsync(Find.builder().query(FIND_DOCUMENT))).get();
                    assertTrue(find.hasNext());
View Full Code Here

TOP

Related Classes of co.paralleluniverse.strands.SuspendableRunnable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.