driver-legacy/src/main/com/mongodb/Mongo.java
@Deprecated
    public CommandResult fsyncAndLock() {
        DBObject command = new BasicDBObject("fsync", 1);
        command.put("lock", 1);
        return getDB(ADMIN_DATABASE_NAME).command(command);
    }
@Deprecated
    public CommandResult fsyncAndLock() {
        DBObject command = new BasicDBObject("fsync", 1);
        command.put("lock", 1);
        return getDB(ADMIN_DATABASE_NAME).command(command);
    }
@ Deprecated public CommandResult fsyncAndLock ( ) { DBObject command = new BasicDBObject ( "fsync" , 1 ) ; command . put ( "lock" , 1 ) ; return getDB ( ADMIN_DATABASE_NAME ) . command ( command ) ; }
Forces the master server to fsync the RAM data to disk, then lock all writes. The database will be read-only after this command
returns.

@return result of the command execution
@throws MongoException if there's a failure
@mongodb.driver.manual reference/command/fsync/ fsync command
Forces the master server to fsync the RAM data to disk then lock all writes . The database will be read - only after this command returns .