Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Commit 0e53a0e

Browse files
committed
Add announce functionality
1 parent 0e982d4 commit 0e53a0e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/control/FBase.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,13 @@ public void startup(boolean announce, boolean backgroundTasks) throws Interrupte
106106

107107
private void announceMachineAdditionToNode() throws FBaseStorageConnectorException,
108108
FBaseCommunicationException, FBaseNamingServiceException {
109-
110-
// TODO 1: Tell a node that is already registered about addition (we need a one-to-one
109+
if (connector.heartbeats_listAll().size() <= 1) {
110+
// update myself (must exist before, created by another node)
111+
taskmanager.runAnnounceUpdateOfOwnNodeConfigurationTask();
112+
}
113+
114+
115+
// TODO 1: Tell a machine that is already registered about addition (we need a one-to-one
111116
// here)
112117

113118
}

0 commit comments

Comments
 (0)