mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-17 22:59:43 +00:00
Resolves checkstyle errors for api-gateway, lazy-loading, leader-election (#1066)
* Reduces checkstyle errors in lazy-loading * Reduces checkstyle errors in leader-election * Reduces checkstyle errors in api-gateway
This commit is contained in:
committed by
Ilkka Seppälä
parent
7f06f3b78c
commit
eae09fc07e
@@ -24,24 +24,27 @@
|
||||
package com.iluwatar.leaderelection;
|
||||
|
||||
/**
|
||||
* Instance interface
|
||||
* Instance interface.
|
||||
*/
|
||||
public interface Instance {
|
||||
|
||||
/**
|
||||
* Check if the instance is alive or not.
|
||||
*
|
||||
* @return {@code true} if the instance is alive.
|
||||
*/
|
||||
boolean isAlive();
|
||||
|
||||
/**
|
||||
* Set the health status of the certain instance.
|
||||
*
|
||||
* @param alive {@code true} for alive.
|
||||
*/
|
||||
void setAlive(boolean alive);
|
||||
|
||||
/**
|
||||
* Consume messages from other instances.
|
||||
*
|
||||
* @param message Message sent by other instances
|
||||
*/
|
||||
void onMessage(Message message);
|
||||
|
||||
Reference in New Issue
Block a user