public static TransactionOptions merge ( final TransactionOptions options , final TransactionOptions defaultOptions ) { notNull ( "options" , options ) ; notNull ( "defaultOptions" , defaultOptions ) ; return TransactionOptions . builder ( ) . writeConcern ( options . getWriteConcern ( ) == null ? defaultOptions . getWriteConcern ( ) : options . getWriteConcern ( ) ) . readConcern ( options . getReadConcern ( ) == null ? defaultOptions . getReadConcern ( ) : options . getReadConcern ( ) ) . readPreference ( options . getReadPreference ( ) == null ? defaultOptions . getReadPreference ( ) : options . getReadPreference ( ) ) . build ( ) ; }
Merge the two provided transaction options with the first taking precedence over the second .