Interface Writer
- All Known Implementing Classes:
DataplaneAuthWriter,KafkaAuthWriter
public interface Writer
-
Method Summary
Modifier and TypeMethodDescriptionbooleanready()Returns true if this is the master writer and is ready to process requestsvoidstartWriter(int generationId) Starts master writer with the specified generation id.voidstopWriter(Integer generationId) Stops this writer because a new master writer was elected.
-
Method Details
-
startWriter
void startWriter(int generationId) Starts master writer with the specified generation id. Writer generation is determined by theMetadataServiceCoordinatorduring writer election.- Parameters:
generationId- Generation id of writer
-
stopWriter
Stops this writer because a new master writer was elected. If `generationId` is null, the writer is stopped regardless of the current generation of the writer. If not, the writer is stopped only if its current generation matches the provided value.- Parameters:
generationId- Generation id of writer being stopped or null to stop regardless of current writer generation
-
ready
boolean ready()Returns true if this is the master writer and is ready to process requests
-