Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconstruction for Hint Manager. #1303

Merged
merged 33 commits into from
Sep 26, 2018
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ee12efb
DELETE masterRouteOnly
tristaZero Sep 26, 2018
78f29d5
ADD masterRouteOnly
tristaZero Sep 26, 2018
3e384fe
modify isMasterRouteOnly
tristaZero Sep 26, 2018
ffaea4f
modify setMasterRouteOnly()
tristaZero Sep 26, 2018
5cb1b1e
modify position
tristaZero Sep 26, 2018
b657036
use Multimap
tristaZero Sep 26, 2018
0cb4262
Multimap<String, Comparable<?>>
tristaZero Sep 26, 2018
a270061
addTableShardingValue()
tristaZero Sep 26, 2018
f1f36c4
add databaseShardingValues
tristaZero Sep 26, 2018
34bb091
clear()
tristaZero Sep 26, 2018
21d679f
modify DATABASE_SHARDING_VALUES
tristaZero Sep 26, 2018
900fa08
setDatabaseShardingValue()
tristaZero Sep 26, 2018
bec624c
HintManagerHolder.setDatabaseShardingValue(value);
tristaZero Sep 26, 2018
ade9472
use static
tristaZero Sep 26, 2018
4535233
addTableShardingValue()
tristaZero Sep 26, 2018
f9e21c2
delete invalid functions
tristaZero Sep 26, 2018
fe743b8
modify position
tristaZero Sep 26, 2018
38f3051
getShardingValue()
tristaZero Sep 26, 2018
5682c7f
getDatabaseShardingValue()
tristaZero Sep 26, 2018
c79b746
getShardingValue()
tristaZero Sep 26, 2018
035000d
getTableShardingValue()
tristaZero Sep 26, 2018
5013166
setDatabaseShardingValue()
tristaZero Sep 26, 2018
6a5ff65
check style
tristaZero Sep 26, 2018
bb82866
adjust format
tristaZero Sep 26, 2018
177c65f
setDatabaseShardingValue()
tristaZero Sep 26, 2018
c1799dd
modify cases
tristaZero Sep 26, 2018
57f9232
modify cases
tristaZero Sep 26, 2018
6573ba4
modify parameters
tristaZero Sep 26, 2018
73c7e6e
Merge branch 'dev' of ssh://github.com/shardingjdbc/sharding-jdbc int…
tristaZero Sep 26, 2018
8c1d80c
DATABASE_SHARDING_VALUES.clear();
tristaZero Sep 26, 2018
5e9a6bf
setDatabaseShardingValue()
tristaZero Sep 26, 2018
6e97edc
modify setDatabaseShardingValue()
tristaZero Sep 26, 2018
0ddd8b4
delete ShardingValue
tristaZero Sep 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
modify isMasterRouteOnly
  • Loading branch information
tristaZero committed Sep 26, 2018
commit 3e384fedc425472e3b1bfe9086214211927624bc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import io.shardingsphere.core.api.HintManager;
import io.shardingsphere.core.api.algorithm.sharding.ShardingValue;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

Expand All @@ -46,9 +45,8 @@ public final class HintManagerHolder {

private static final ThreadLocal<HintManager> HINT_MANAGER_HOLDER = new ThreadLocal<>();

@Getter
@Setter
private boolean masterRouteOnly;
private static boolean isMasterRouteOnly;

/**
* Set hint manager.
Expand Down Expand Up @@ -95,7 +93,7 @@ public static Optional<ShardingValue> getTableShardingValue(final String logicTa
* @return is force route to master database only or not
*/
public static boolean isMasterRouteOnly() {
return null != HINT_MANAGER_HOLDER.get() && HINT_MANAGER_HOLDER.get().isMasterRouteOnly();
return null != HINT_MANAGER_HOLDER.get() && isMasterRouteOnly;
}

/**
Expand Down