public static TaggableReadPreference nearest ( final TagSet tagSet , final long maxStaleness , final TimeUnit timeUnit ) { return new NearestReadPreference ( singletonList ( tagSet ) , maxStaleness , timeUnit ) ; }
Gets a read preference that forces reads to the primary or a secondary with the given set of tags that is less stale than the given maximum .