public static ReadPreference secondaryPreferred ( final long maxStaleness , final TimeUnit timeUnit ) { return new SecondaryPreferredReadPreference ( Collections . < TagSet > emptyList ( ) , maxStaleness , timeUnit ) ; }
Gets a read preference that forces reads to a secondary that is less stale than the given maximumm if one is available otherwise to the primary .