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 classNameResolver.ResolutionResult.BuilderA builder forNameResolver.ResolutionResult.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(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.AttributesgetAttributes()Gets the attributes associated with the addresses resolved by name resolution.NameResolver.ConfigOrErrorgetServiceConfig()Gets the Service Config parsed byNameResolver.Args.getServiceConfigParser().inthashCode()Useful for testing.static NameResolver.ResolutionResult.BuildernewBuilder()Constructs a new builder of a name resolution result.NameResolver.ResolutionResult.BuildertoBuilder()Converts these results back to a builder.StringtoString()
-
-
-
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.EMPTYwill 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.
-
-