-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: created separate connector for Redis replication and ping
- Loading branch information
Showing
159 changed files
with
3,244 additions
and
3,373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 41 additions & 28 deletions
69
connectors/riot-db/src/main/java/com/redis/riot/db/DataSourceOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,58 @@ | ||
package com.redis.riot.db; | ||
|
||
import javax.sql.DataSource; | ||
|
||
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; | ||
|
||
public class DataSourceOptions { | ||
|
||
private String driver; | ||
private String driver; | ||
|
||
private String url; | ||
|
||
private String url; | ||
private String username; | ||
|
||
private String username; | ||
private String password; | ||
|
||
private String password; | ||
public String getDriver() { | ||
return driver; | ||
} | ||
|
||
public String getDriver() { | ||
return driver; | ||
} | ||
public void setDriver(String driver) { | ||
this.driver = driver; | ||
} | ||
|
||
public void setDriver(String driver) { | ||
this.driver = driver; | ||
} | ||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
|
||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
public String getUsername() { | ||
return username; | ||
} | ||
|
||
public String getUsername() { | ||
return username; | ||
} | ||
public void setUsername(String username) { | ||
this.username = username; | ||
} | ||
|
||
public void setUsername(String username) { | ||
this.username = username; | ||
} | ||
public String getPassword() { | ||
return password; | ||
} | ||
|
||
public String getPassword() { | ||
return password; | ||
} | ||
public void setPassword(String password) { | ||
this.password = password; | ||
} | ||
|
||
public void setPassword(String password) { | ||
this.password = password; | ||
} | ||
public DataSource dataSource() { | ||
DataSourceProperties properties = new DataSourceProperties(); | ||
properties.setUrl(url); | ||
properties.setDriverClassName(driver); | ||
properties.setUsername(username); | ||
properties.setPassword(password); | ||
return properties.initializeDataSourceBuilder().build(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
connectors/riot-db/src/main/java/com/redis/riot/db/DatabaseUtils.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.