Package org.apache.iceberg.rest
Class Endpoint
- java.lang.Object
-
- org.apache.iceberg.rest.Endpoint
-
public class Endpoint extends java.lang.ObjectHolds an endpoint definition that consists of the HTTP method (GET, POST, DELETE, ...) and the resource path as defined in the Iceberg OpenAPI REST specification without parameter substitution, such as /v1/{prefix}/namespaces/{namespace}.
-
-
Field Summary
Fields Modifier and Type Field Description static EndpointV1_COMMIT_TRANSACTIONstatic EndpointV1_CREATE_NAMESPACEstatic EndpointV1_CREATE_TABLEstatic EndpointV1_CREATE_VIEWstatic EndpointV1_DELETE_NAMESPACEstatic EndpointV1_DELETE_TABLEstatic EndpointV1_DELETE_VIEWstatic EndpointV1_LIST_NAMESPACESstatic EndpointV1_LIST_TABLESstatic EndpointV1_LIST_VIEWSstatic EndpointV1_LOAD_NAMESPACEstatic EndpointV1_LOAD_TABLEstatic EndpointV1_LOAD_VIEWstatic EndpointV1_REGISTER_TABLEstatic EndpointV1_RENAME_TABLEstatic EndpointV1_RENAME_VIEWstatic EndpointV1_REPORT_METRICSstatic EndpointV1_UPDATE_NAMESPACEstatic EndpointV1_UPDATE_TABLEstatic EndpointV1_UPDATE_VIEW
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcheck(java.util.Set<Endpoint> supportedEndpoints, Endpoint endpoint)Checks if the set of endpoints support the givenEndpoint.static voidcheck(java.util.Set<Endpoint> supportedEndpoints, Endpoint endpoint, org.apache.iceberg.relocated.com.google.common.base.Supplier<java.lang.RuntimeException> supplier)Checks if the set of endpoints support the givenEndpoint.static Endpointcreate(java.lang.String httpMethod, java.lang.String path)booleanequals(java.lang.Object o)static EndpointfromString(java.lang.String endpoint)inthashCode()java.lang.StringhttpMethod()java.lang.Stringpath()java.lang.StringtoString()
-
-
-
Field Detail
-
V1_LIST_NAMESPACES
public static final Endpoint V1_LIST_NAMESPACES
-
V1_LOAD_NAMESPACE
public static final Endpoint V1_LOAD_NAMESPACE
-
V1_CREATE_NAMESPACE
public static final Endpoint V1_CREATE_NAMESPACE
-
V1_UPDATE_NAMESPACE
public static final Endpoint V1_UPDATE_NAMESPACE
-
V1_DELETE_NAMESPACE
public static final Endpoint V1_DELETE_NAMESPACE
-
V1_COMMIT_TRANSACTION
public static final Endpoint V1_COMMIT_TRANSACTION
-
V1_LIST_TABLES
public static final Endpoint V1_LIST_TABLES
-
V1_LOAD_TABLE
public static final Endpoint V1_LOAD_TABLE
-
V1_CREATE_TABLE
public static final Endpoint V1_CREATE_TABLE
-
V1_UPDATE_TABLE
public static final Endpoint V1_UPDATE_TABLE
-
V1_DELETE_TABLE
public static final Endpoint V1_DELETE_TABLE
-
V1_RENAME_TABLE
public static final Endpoint V1_RENAME_TABLE
-
V1_REGISTER_TABLE
public static final Endpoint V1_REGISTER_TABLE
-
V1_REPORT_METRICS
public static final Endpoint V1_REPORT_METRICS
-
V1_LIST_VIEWS
public static final Endpoint V1_LIST_VIEWS
-
V1_LOAD_VIEW
public static final Endpoint V1_LOAD_VIEW
-
V1_CREATE_VIEW
public static final Endpoint V1_CREATE_VIEW
-
V1_UPDATE_VIEW
public static final Endpoint V1_UPDATE_VIEW
-
V1_DELETE_VIEW
public static final Endpoint V1_DELETE_VIEW
-
V1_RENAME_VIEW
public static final Endpoint V1_RENAME_VIEW
-
-
Method Detail
-
httpMethod
public java.lang.String httpMethod()
-
path
public java.lang.String path()
-
create
public static Endpoint create(java.lang.String httpMethod, java.lang.String path)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
fromString
public static Endpoint fromString(java.lang.String endpoint)
-
check
public static void check(java.util.Set<Endpoint> supportedEndpoints, Endpoint endpoint)
Checks if the set of endpoints support the givenEndpoint.- Parameters:
supportedEndpoints- The set of supported endpoints to checkendpoint- The endpoint to check against the set of supported endpoints- Throws:
java.lang.UnsupportedOperationException- if the givenEndpointis not included in the set of endpoints.
-
check
public static void check(java.util.Set<Endpoint> supportedEndpoints, Endpoint endpoint, org.apache.iceberg.relocated.com.google.common.base.Supplier<java.lang.RuntimeException> supplier)
Checks if the set of endpoints support the givenEndpoint.- Parameters:
supportedEndpoints- The set of supported endpoints to checkendpoint- The endpoint to check against the set of supported endpointssupplier- The supplier throwing aRuntimeExceptionif the givenEndpointis not included in the set of endpoints.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-