Package com.allanbank.mongodb.bson

Examples of com.allanbank.mongodb.bson.Document


    }
   
    @Override
    @Suspendable
    public Document runCommand(final DocumentAssignable command) throws MongoDbException {
        Document res = null;
        try {
            res = new FiberMongoCallback<Document>() {
                @Override
                protected void requestAsync() {
                    FiberMongoDatabaseImpl.super.runCommandAsync(this, command);
View Full Code Here


    }

    @Override
    @Suspendable
    public Document runCommand(final String command) throws MongoDbException {
        Document res = null;
        try {
            res = new FiberMongoCallback<Document>() {
                @Override
                protected void requestAsync() {
                    FiberMongoDatabaseImpl.super.runCommandAsync(this, command);
View Full Code Here

    }

    @Override
    @Suspendable
    public Document runCommand(final String command, final DocumentAssignable options) throws MongoDbException {
        Document res = null;
        try {
            res = new FiberMongoCallback<Document>() {
                @Override
                protected void requestAsync() {
                    FiberMongoDatabaseImpl.super.runCommandAsync(this, command, options);
View Full Code Here

    }

    @Override
    @Suspendable
    public Document runCommand(final String commandName, final int commandValue, final DocumentAssignable options) throws MongoDbException {
        Document res = null;
        try {
            res = new FiberMongoCallback<Document>() {
                @Override
                protected void requestAsync() {
                    FiberMongoDatabaseImpl.super.runCommandAsync(this, commandName, commandValue, options);
View Full Code Here

    }

    @Override
    @Suspendable
    public Document runCommand(final String commandName, final String commandValue, final DocumentAssignable options) throws MongoDbException {
        Document res = null;
        try {
            res = new FiberMongoCallback<Document>() {
                @Override
                protected void requestAsync() {
                    FiberMongoDatabaseImpl.super.runCommandAsync(this, commandName, commandValue, options);
View Full Code Here

    @Test
    public void testRunCommandDocument() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                Document res = mongoDb.runCommand (
                    BuilderFactory.start()
                        .add("ping", 1)
                );
                assertEquals("1.0", res.get("ok").getValueAsString());
            }
        }).start().join();
    }
View Full Code Here

    @Test
    public void testRunCommandString() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                Document res = mongoDb.runCommand("ping");
                assertEquals("1.0", res.get("ok").getValueAsString());
            }
        }).start().join();
    }
View Full Code Here

    @Test
    public void testRunCommandOptions() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                Document res = mongoDb.runCommand("ping", null);
                assertEquals("1.0", res.get("ok").getValueAsString());
            }
        }).start().join();
    }
View Full Code Here

    @Test
    public void testRunCommandNameIntValueOptions() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                Document res = mongoDb.runCommand("ping", 1, null);
                assertEquals("1.0", res.get("ok").getValueAsString());
            }
        }).start().join();
    }
View Full Code Here

    @Test
    public void testRunCommandNameStringValueOptions() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                Document res = mongoDb.runCommand("ping", "1", null);
                assertEquals("1.0", res.get("ok").getValueAsString());
            }
        }).start().join();
    }
View Full Code Here

TOP

Related Classes of com.allanbank.mongodb.bson.Document

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.