blob: 96afc537c59ec9ec1b5d46946f695527657077ec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.http.client.core;
import com.google.common.annotations.Beta;
/**
* Return types for the server.
*
* @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
* @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
* @since 5.1.20
*/
@Beta
public enum ErrorCode {
OK(true, true),
ERROR(false, false),
TRANSIENT_ERROR(false, true),
END_OF_FEED(true, true);
private boolean success;
private boolean _transient;
private ErrorCode(boolean success, boolean _transient) {
this.success = success;
this._transient = _transient;
}
public boolean isSuccess() {
return success;
}
public boolean isTransient() {
return _transient;
}
}
|