Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Transaction API (and break client-java dependency to server)…
… (#4977) ## What is the goal of this PR? Issue #4513: we need to remove any direct and transitive dependencies from //client-java (`grakn.core.client`) to //server (`grakn.core.server` and `grakn.core.graql`). In order to do that, we need to split Grakn Transaction API (`Session`, `Transaction`, `Keyspace` interfaces`) into a separate module, which does not carry over any external dependency transitively. ## What are the changes implemented in this PR? Continuing from PR #4976, this PR fixes #4513, by completing the following changes. - Replaced all usage of `Transaction` in `//server` and tests with `TransactionOLTP` - Replaced all usage of `Session` in `//server` and tests with `SessionImpl` - Replaced the use of `Transaction.Type.<READ|WRITE>` to open transactions with simpler and more robust API: `session.transaction().read()` and `session.transaction().write()`. This avoids client and server transaction users to import and use `Transaction.Type` class which quite frankly complicates the architecture shared between `//client` and `//server`. - Extracted `Session`, `Transaction` into its own package `//api` (along with `Keyspace` which was moved there in the previous PR). - Removed `//client-java` dependency onto `//server` - finally.
- Loading branch information