Java SDK: Migrate from V1 to V2
Java SDK: Migrate from V1 to V2
Java SDK: Migrate from V1 to V2
This guide outlines the steps required to migrate the Skyflow Java SDK from version 1 (V1) to version 2 (V2).
V1 required implementing a TokenProvider interface. V2 lets you choose from five credential types.
V1:
V2:
Use only one authentication method. API key or environment variables are recommended for production use.
V2 introduces a builder pattern and multi-vault support. Log levels are now per-instance instead of global.
V1:
V2:
Key changes:
vaultUrl replaced with clusterIdenv is now required (Env.PROD, Env.SANDBOX, Env.DEV)V2 uses native ArrayList and HashMap instead of JSON objects from third-party libraries. Requests use a builder pattern.
V1:
V2:
V1 response:
V2 response:
V2 uses the builder pattern on InsertRequest for optional parameters instead of a separate InsertOptions object.
V1:
V2:
V2 errors include more detail to help with debugging.
V1:
V2:
Use the requestId field when contacting Skyflow support — it uniquely identifies the request for faster diagnosis.