public WriteConcern withWTimeout ( final long wTimeout , final TimeUnit timeUnit ) { notNull ( "timeUnit" , timeUnit ) ; long newWTimeOutMS = TimeUnit . MILLISECONDS . convert ( wTimeout , timeUnit ) ; isTrueArgument ( "wTimeout >= 0" , wTimeout >= 0 ) ; isTrueArgument ( "wTimeout <= " + Integer . MAX_VALUE + " ms" , newWTimeOutMS <= Integer . MAX_VALUE ) ; return new WriteConcern ( w , ( int ) newWTimeOutMS , fsync , journal ) ; }
Constructs a new WriteConcern from the current one and the specified wTimeout in the given time unit .