kz.greetgo.logging.zookeeper.config.EventConfigFile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of greetgo-logging-zookeeper Show documentation
Show all versions of greetgo-logging-zookeeper Show documentation
Logging mechanism using in greetgo!
package kz.greetgo.logging.zookeeper.config;
import java.util.Date;
import java.util.Optional;
public interface EventConfigFile extends AutoCloseable {
EventRegistration addEventHandler(EventFileHandler eventFileHandler);
default boolean exists() {
return createdAt().isPresent();
}
void ensureLookingFor();
Optional createdAt();
Optional lastModifiedAt();
byte[] readContent();
void writeContent(byte[] content);
default void delete() {
writeContent(null);
}
@Override
void close();
}