The package database class provides the following methods for querying the synchronized state and the last synchronization time of a synchronization group:
// Returns if the synchronizationGroup was synchronized public static boolean isSynchronized(String synchronizationGroup) // Returns the last synchronization time of the synchronizationGroup public static java.util.Date getLastSynchronizationTime(String synchronizationGroup)