Skip to content

Commit

Permalink
Add global clock dependency in jdbc adapter (#24651)
Browse files Browse the repository at this point in the history
* Add global clock dependency in jdbc adapter

* fix
  • Loading branch information
FlyingZC authored Mar 16, 2023
1 parent 815dfe6 commit 43bdccb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions jdbc/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@
<artifactId>shardingsphere-transaction-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-global-clock-core</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-global-clock-tso-core</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-sql-parser-sql92</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public final class GlobalClockTransactionHook extends TransactionHookAdapter {

private GlobalClockTransactionExecutor globalClockTransactionExecutor;

private LockDefinition lockDefinition = new GlobalLockDefinition("global_clock");
private final LockDefinition lockDefinition = new GlobalLockDefinition("global_clock");

private boolean enabled;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* Local timestamp oracle provider.
*/
public class LocalTSOProvider implements TSOProvider {
public final class LocalTSOProvider implements TSOProvider {

private final AtomicLong localClock = new AtomicLong();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/**
* Redis timestamp oracle provider.
*/
public class RedisTSOProvider implements TSOProvider {
public final class RedisTSOProvider implements TSOProvider {

@Override
public void init(final Properties props) {
Expand Down

0 comments on commit 43bdccb

Please sign in to comment.