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 java.lang.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 Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Useful for testing.java.util.List<EquivalentAddressGroup>
getAddresses()
Gets the addresses resolved by name resolution.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.java.lang.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
public java.util.List<EquivalentAddressGroup> getAddresses()
Gets the addresses resolved by name resolution.- Since:
- 1.21.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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Useful for testing. May be slow to calculate.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Useful for testing. May be slow to calculate.- Overrides:
hashCode
in classjava.lang.Object
-
-