public static ReadPreference primaryPreferred ( final long maxStaleness , final TimeUnit timeUnit ) { return new PrimaryPreferredReadPreference ( Collections . < TagSet > emptyList ( ) , maxStaleness , timeUnit ) ; }
Gets a read preference that forces reads to the primary if available otherwise to a secondary .