@Test public void testGetConsistency_TIMELINE_InProperties() { Properties props = new Properties(); props.setProperty(PhoenixRuntime.CONSISTENCY_ATTRIB, "TIMELINE"); assertTrue(JDBCUtil.getConsistencyLevel("localhost", props, Consistency.STRONG.toString()) == Consistency.TIMELINE); }
public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue) { String consistency = findProperty(url, info, PhoenixRuntime.CONSISTENCY_ATTRIB); if(consistency != null && consistency.equalsIgnoreCase(Consistency.TIMELINE.toString())){ return Consistency.TIMELINE; } return Consistency.STRONG; }
JDBCUtil { public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue) { String consistency = findProperty(url, info, PhoenixRuntime.CONSISTENCY_ATTRIB); if(consistency != null && consistency.equalsIgnoreCase(Consistency.TIMELINE.toString())){ return Consistency.TIMELINE; } return Consistency.STRONG; } }
JDBCUtil { public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue) { String consistency = findProperty(url, info, PhoenixRuntime.CONSISTENCY_ATTRIB); if(consistency != null && consistency.equalsIgnoreCase(Consistency.TIMELINE.toString())){ return Consistency.TIMELINE; } return Consistency.STRONG; } private  JDBCUtil(); }
JDBCUtil { public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue) { String consistency = findProperty(url, info, PhoenixRuntime.CONSISTENCY_ATTRIB); if(consistency != null && consistency.equalsIgnoreCase(Consistency.TIMELINE.toString())){ return Consistency.TIMELINE; } return Consistency.STRONG; } private  JDBCUtil(); static String findProperty(String url, Properties info, String propName); static String removeProperty(String url, String propName); static Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info); static Long getCurrentSCN(String url, Properties info); static Long getBuildIndexSCN(String url, Properties info); static int getMutateBatchSize(String url, Properties info, ReadOnlyProps props); static long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props); static @Nullable PName getTenantId(String url, Properties info); static boolean getAutoCommit(String url, Properties info, boolean defaultValue); static Consistency getConsistencyLevel(String url, Properties info, String defaultValue); static boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps); static String getSchema(String url, Properties info, String defaultValue); }
JDBCUtil { public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue) { String consistency = findProperty(url, info, PhoenixRuntime.CONSISTENCY_ATTRIB); if(consistency != null && consistency.equalsIgnoreCase(Consistency.TIMELINE.toString())){ return Consistency.TIMELINE; } return Consistency.STRONG; } private  JDBCUtil(); static String findProperty(String url, Properties info, String propName); static String removeProperty(String url, String propName); static Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info); static Long getCurrentSCN(String url, Properties info); static Long getBuildIndexSCN(String url, Properties info); static int getMutateBatchSize(String url, Properties info, ReadOnlyProps props); static long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props); static @Nullable PName getTenantId(String url, Properties info); static boolean getAutoCommit(String url, Properties info, boolean defaultValue); static Consistency getConsistencyLevel(String url, Properties info, String defaultValue); static boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps); static String getSchema(String url, Properties info, String defaultValue);  }