public Map<CommitInterface, List<FileInterface>> requestUpdate(String token) { // throws // RemoteException // { keepMeAlive(token); if (alive_users.containsKey(token)) { return EngineImpl.GetInstance().requestUpdate(token, alive_users.get(token)); } else { return null; } }
public boolean registerMe( String token, UserInterface user, ClientReceptionInterface cri) { // throws RemoteException { if (alive_users.containsKey(token) && alive_users.get(token).equals(user)) { keepMeAlive(token); return true; } else { alive_users.put(token, user); alive_clients.put(token, new Date()); alive_clients_to_push.put(token, cri); return EngineImpl.GetInstance().register(token, user.GetLastActive()); } }
public boolean unregisterMe(String token, UserInterface user) { // throws // RemoteException // { if (alive_users.containsKey(token) && alive_users.get(token).equals(user)) { if (EngineImpl.GetInstance().unregister(token)) { alive_users.remove(token); alive_clients.remove(token); alive_clients_to_push.remove(token); return user.SetLastActive(new Date()); } else { return false; } } return false; }
public boolean push(String token, Date timestamp, byte[] revisionNumber) { // throws // RemoteException // { keepMeAlive(token); return EngineImpl.GetInstance().push(token, timestamp, revisionNumber); }
public Date commit(String token, CommitInterface commit) { // throws // RemoteException // { keepMeAlive(token); return EngineImpl.GetInstance().commit(token, commit); }