SyncInfo.java 874 B

12345678910111213141516171819202122232425
  1. package de.tudarmstadt.informatik.hostage.logging;
  2. import java.io.Serializable;
  3. import java.util.HashMap;
  4. public class SyncInfo implements Serializable {
  5. private static final long serialVersionUID = 1L;
  6. /**
  7. * The first Message that should be sent when two devices want to synchronize.
  8. * It should contain a Map of devices and either the latest attack ID the device has in the database
  9. * or the time of the latest attack.
  10. *
  11. *
  12. * | A -> SyncInfo -> B |
  13. * | | ----- SyncInfo independent
  14. * | A <- SyncInfo <- B |
  15. *
  16. *
  17. * Now A looks what it has that B does not have, by comparing the device ID's and the newest entry indicator,
  18. * and sends it to B. (SyncData object)
  19. * B does the same, now these two devices should be synchronized.
  20. */
  21. public HashMap<String, Long> deviceMap;
  22. }