Package io.grpc
Class NameResolver.ResolutionResult
- java.lang.Object
-
- io.grpc.NameResolver.ResolutionResult
-
- Enclosing class:
- NameResolver
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770") public static final class NameResolver.ResolutionResult extends Object
Represents the results from a Name Resolver.- Since:
- 1.21.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NameResolver.ResolutionResult.Builder
A builder forNameResolver.ResolutionResult
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object obj)
Useful for testing.List<EquivalentAddressGroup>
getAddresses()
Deprecated.Will be superseded by getAddressesOrErrorStatusOr<List<EquivalentAddressGroup>>
getAddressesOrError()
Gets the addresses resolved by name resolution or the error in doing so.Attributes
getAttributes()
Gets the attributes associated with the addresses resolved by name resolution.NameResolver.ConfigOrError
getServiceConfig()
Gets the Service Config parsed byNameResolver.Args.getServiceConfigParser()
.int
hashCode()
Useful for testing.static NameResolver.ResolutionResult.Builder
newBuilder()
Constructs a new builder of a name resolution result.NameResolver.ResolutionResult.Builder
toBuilder()
Converts these results back to a builder.String
toString()
-
-
-
Method Detail
-
newBuilder
public static NameResolver.ResolutionResult.Builder newBuilder()
Constructs a new builder of a name resolution result.- Since:
- 1.21.0
-
toBuilder
public NameResolver.ResolutionResult.Builder toBuilder()
Converts these results back to a builder.- Since:
- 1.21.0
-
getAddresses
@Deprecated public List<EquivalentAddressGroup> getAddresses()
Deprecated.Will be superseded by getAddressesOrErrorGets the addresses resolved by name resolution.- Since:
- 1.21.0
-
getAddressesOrError
public StatusOr<List<EquivalentAddressGroup>> getAddressesOrError()
Gets the addresses resolved by name resolution or the error in doing so.- Since:
- 1.65.0
-
getAttributes
@ResolutionResultAttr public Attributes getAttributes()
Gets the attributes associated with the addresses resolved by name resolution. If there are no attributes,Attributes.EMPTY
will be returned.- Since:
- 1.21.0
-
getServiceConfig
@Nullable public NameResolver.ConfigOrError getServiceConfig()
Gets the Service Config parsed byNameResolver.Args.getServiceConfigParser()
.- Since:
- 1.21.0
-
equals
public boolean equals(Object obj)
Useful for testing. May be slow to calculate.
-
-