-
Notifications
You must be signed in to change notification settings - Fork 4
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
DAO and UpdateTable #7
base: master
Are you sure you want to change the base?
Conversation
… with redis cluster
Conflicts: .gitignore pom.xml src/main/java/com/percero/agents/sync/access/RedisAccessManager.java src/main/java/com/percero/agents/sync/jobs/UpdateTablePoller.java src/main/java/com/percero/agents/sync/services/IDataProvider.java src/main/java/com/percero/agents/sync/services/RedisDataProvider.java src/main/java/com/percero/agents/sync/services/SyncAgentDataProvider.java
Conflicts: pom.xml src/main/java/com/convergys/pulse/service/PulseHttpAuthProvider.java
@jonnysamps Can you code review this? It has both the DAODataProvider AND the UpdateTable stuff. I had to merge the two together since changes to the SyncAgentDataProvider I was doing for DAODataProvider had an impact on UpdateTable. |
// from the class access journal set | ||
for(String caj : clientAccessJournals){ | ||
if(cacheDataStore.getSetIsEmpty(RedisKeyUtils.ACCESS_JOURNAL_PREFIX+caj)){ | ||
String[] parts = caj.split(":"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do this kind of thing a lot, you should probably refactor that into a helper method. Add it to the ClassIDPair class like
public static ClassIDPair fromCacheKey(String cacheKey){
String[] parts = cacheKey.split(":");
className = parts[0];
ID = parts[1];
}
} | ||
|
||
@SuppressWarnings({ "unchecked" }) | ||
private static Map<String, IDataAccessObject<? extends IPerceroObject>> dataAccessObjects = Collections.synchronizedMap(new HashMap<String, IDataAccessObject<? extends IPerceroObject>>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this class is singleton you shouldn't use static members. It's redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turning this into a spring component
Added DAODataProvider and UpdateTable functionality