Forcing a full/partial sync between nodes in a redundant pair

In a module I am developing, I want to programmatically initiate both a full and partial sync when certain conditions are met. I was looking through the Javadoc's and found some interfaces that seem related to this, but no concrete implementations. Is there a method that will allow me to force a redundancy sync in the Java SDK?

Yes, you invoke .postRuntimeUpdate() from the RuntimeStateManager that you get from the RedundancyManager from the gateway context.

The payload you supply is simply any Serializable object. Your redundancy handler on the other end must examine its type (if you can send multiple types) to determine how to dispatch it.

I declare a handler like so:

public class RedundancyHandler implements Runnable, RedundancyStateListener, RuntimeStateProvider {
....
}

The gateway itself will call the methods for getting and setting full state whenever a user calls for it on the gateway web interfaces. You are responsible for scheduling and applying partial updates (if desired). That's why I include the Runnable interface.

(These methods don't let you do anything to other modules or the gateway as a whole, but you can post any kind of sync for your module.)

@pturmel RuntimeStateManager::postRuntimeUpdate is deprecated. Any idea what is the new method to use ?