If an application requires a callback (for example, to allow the client framework to provide notification of synchronization results) create a custom callback handler.
import com.sybase.persistence.DefaultCallbackHandler; …… public class Test { public static void main(String[] args) { SUP101DB.registerCallbackHandler(new MyCallbackHandler()); GenericList<SynchronizationGroup> sgs = new GenericList<SynchronizationGroup>(); sgs.add(SUP101DB.getSynchronizationGroup("sg1")); sgs.add(SUP101DB.getSynchronizationGroup("sg2")); SUP101DB.beginSynchronize(sgs, "my test synchronization context"); } } class MyCallbackHandler extends DefaultCallbackHandler { public int onSynchronize(GenericList groups, SynchronizationContext context) { if ( context == null ) { return SynchronizationAction.CANCEL; } if ("my test synchronization context".equals((String)(context.getUserContext()))) { return super.onSynchronize(groups, context); } switch (context.getStatus()) { case SynchronizationStatus.STARTING: if (waitForMoreChanges() { return SynchronizationAction.CANCEL; } else { return SynchronizationAction.CONTINUE; } default: return SynchronizationAction.CONTINUE; } } }