Interface DataChannelSyncFilter

  • All Known Subinterfaces:
    All Known Implementing Classes:
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    public interface DataChannelSyncFilter
    An interface of a filter that allows to intercept DataChannel sync operations. Sync filters allow to implement chains of custom processors around a DataChannel.


     public class MySyncFilter implements DataChannelSyncFilter {
         public GraphDiff onSync(ObjectContext originatingContext,
                                 GraphDiff changes,
                                 int syncType,
                                 DataChannelSyncFilterChain filterChain) {
             System.out.println("Do something before sync");
             // process changes or return some custom diff
             GraphDiff diff = filterChain.onSync(originatingContext, changes, syncType);
             System.out.println("Do something after sync");
             return diff;
    See Also:
    DataChannelQueryFilter, ServerModule.contributeDomainSyncFilters(org.apache.cayenne.di.Binder)