THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
package org.apache.kafka.server.authorizer; public enum AuthorizationResult { ALLOWED, DENIED } import org.apache.kafka.common.annotation.InterfaceStability; @InterfaceStability.Evolving public class AclCreateResult { private final Throwable exception; public AclCreateResult() { this(null); } public AclCreateResult(Throwable exception) { this.exception = exception; } /** * Returns any exception during create. If exception is null, the request has succeeded. */ public Throwable exception() { return exception; } /** * Returns true if the request failed. */ public boolean failed() { return exception != null; } } import org.apache.kafka.common.annotation.InterfaceStability; @InterfaceStability.Evolving public class AclDeleteResult { private final Throwable exception; private final boolean deleted; public AclDeleteResult(Throwable exception) { this(false, exception); } public AclDeleteResult(boolean deleted) { this(deleted, null); } private AclDeleteResult(boolean deleted, Throwable exception) { this.deleted = deleted; this.exception = exception; } /** * Returns any exception while attempting to delete an ACL. */ public Throwable exception() { return exception; } /** * Returns true if request has failed with an exception. {@link #deleted()} indicates if * an ACL was deleted. */ public boolean failed() { return exception != null; } /** * Returns true if a delete was performed. */ public boolean deleted() { return deleted; } } |
...