public ViewInfo ping(int view, String serverName) throws RemoteException {
        lastPing.put(serverName, currentTime);

        if (serverName.equals(viewInfo.backup)) { // Backup ping
            if (view == 0 && dataSavedOnBackup) {
                dataSavedOnBackup = false;
                ++viewInfo.view;
            }
        } else if (serverName.equals(viewInfo.primary)) { // Primary ping
            if (view == 0 && dataSavedOnBackup) {
                dataSavedOnBackup = false;
                viewInfo.primary = viewInfo.backup;
                viewInfo.backup = serverName;
                ++viewInfo.view;
            } else if (view == viewInfo.view) {
                dataSavedOnBackup = true;
            }
        } else {
            if (viewInfo.primary.isEmpty()) {
                viewInfo.primary = serverName;
                dataSavedOnBackup = false;
                ++viewInfo.view;
            } else if (viewInfo.backup.isEmpty()) {
                viewInfo.backup = serverName;
                ++viewInfo.view;
            }
        }

        return new ViewInfo(viewInfo);
    }