public static ReadPreference nearest ( final long maxStaleness , final TimeUnit timeUnit ) { return new NearestReadPreference ( Collections . < TagSet > emptyList ( ) , maxStaleness , timeUnit ) ; }
Gets a read preference that forces reads to a primary or a secondary that is less stale than the given maximum .