Search in sources :

Example 1 with DbusModPartitionedFilterFactory

use of com.linkedin.databus.client.pub.DbusModPartitionedFilterFactory in project databus by linkedin.

the class MockRemoteExceptionHandler method createFakeFilter.

private static DbusKeyCompositeFilterConfig createFakeFilter() throws DatabusException {
    DbusModPartitionedFilterFactory filterFactory = new DbusModPartitionedFilterFactory("source1");
    DbusClusterInfo cluster = new DbusClusterInfo("cluster", 2, 2);
    DbusPartitionInfo partition = new DbusPartitionInfo() {

        @Override
        public long getPartitionId() {
            return 1;
        }

        @Override
        public boolean equalsPartition(DbusPartitionInfo other) {
            return true;
        }
    };
    return filterFactory.createServerSideFilter(cluster, partition);
}
Also used : DbusClusterInfo(com.linkedin.databus.client.pub.DbusClusterInfo) DbusModPartitionedFilterFactory(com.linkedin.databus.client.pub.DbusModPartitionedFilterFactory) DbusPartitionInfo(com.linkedin.databus.client.pub.DbusPartitionInfo)

Aggregations

DbusClusterInfo (com.linkedin.databus.client.pub.DbusClusterInfo)1 DbusModPartitionedFilterFactory (com.linkedin.databus.client.pub.DbusModPartitionedFilterFactory)1 DbusPartitionInfo (com.linkedin.databus.client.pub.DbusPartitionInfo)1