Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/io/github/rtib/cmc/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,12 @@ public void onUp(Node node) {

@Override
public void onDown(Node node) {
// ToDo: add handler here
shutdown();
}

@Override
public void onRemove(Node node) {
// ToDo: add handler here
shutdown();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
Expand Down Expand Up @@ -83,4 +83,11 @@ private void deactivate() {
if (httpServer != null)
httpServer.stop();
}

/**
* Shutdown the service when the connected Cassandra node leaves the ring.
*/
public void shutdownService() {
deactivate();
}
}