ThemisCpUtil { public static void processFilters(Filter filter, FilterCallable callable) throws IOException { if (filter != null) { if (filter instanceof FilterList) { FilterList filterList = (FilterList) filter; if (!callable.processFilterListOperator(filterList.getOperator())) { return; } for (Filter filterInList : filterList.getFilters()) { processFilters(filterInList, callable); } } else { callable.processConcreteFilter(filter); } } }  static String getDisallowedFilterClassNameString(); static void processFilters(Filter filter, FilterCallable callable); static void moveRowkeyFiltersForWriteGet(Get sourceGet, Get destGet); static void moveRowkeyFiltersForWriteScan(Scan sourceScan, Scan destScan); static void addLockAndWriteColumnToGet(Get userGet, Get internalGet, long startTs); static Result removeNotRequiredLockColumns(Map<byte[], NavigableSet<byte[]>> familyMap,
      Result result); static Get constructLockAndWriteGet(Get userGet, long startTs); static void prepareGet(Get get, Collection<HColumnDescriptor> families); static void prepareScan(Scan scan, Collection<HColumnDescriptor> families); static Scan constructLockAndWriteScan(Scan userScan, long startTs); static void addLockAndWriteColumnToScan(Column column, Scan scan); static Get constructDataGetByPutKvs(List<KeyValue> putKvs, Filter filter); static void addWriteColumnToGet(Column column, Get get); static boolean isLockResult(Result result); static Pair<List<KeyValue>, List<KeyValue>> seperateLockAndWriteKvs(List<KeyValue> kvs); static Set<Class<? extends Filter>> ALLOWED_ROWKEY_FILTER_CLASSES; static Set<Class<? extends Filter>> DISALLOWD_FILTERS; }
@Test public void testToConcreteFilters() throws IOException { FiltersCounter counter = new FiltersCounter(); ThemisCpUtil.processFilters(null, counter); Assert.assertEquals(0, counter.concreteFilterCount); counter = new FiltersCounter(); ThemisCpUtil.processFilters(new ColumnRangeFilter(), counter); Assert.assertEquals(1, counter.concreteFilterCount); counter = new FiltersCounter(); FilterList filterList = new FilterList(); filterList.addFilter(new ColumnRangeFilter()); filterList.addFilter(new ColumnCountGetFilter()); ThemisCpUtil.processFilters(filterList, counter); Assert.assertEquals(2, counter.concreteFilterCount); counter = new ConcreteFiltersCounter(); ThemisCpUtil.processFilters(new ColumnRangeFilter(), counter); Assert.assertEquals(1, counter.concreteFilterCount); counter = new ConcreteFiltersCounter(); ThemisCpUtil.processFilters(filterList, counter); Assert.assertEquals(0, counter.concreteFilterCount); }