Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

fix SortedCacheAddress to make work with JbossCacheClient #378

Merged
merged 2 commits into from
Mar 23, 2018

Conversation

deedee
Copy link
Contributor

@deedee deedee commented Mar 21, 2018

No description provided.

@@ -16,12 +16,14 @@
*
* @version 1.0
*/
public class SortedCacheAddress implements CacheAddress {
public class SortedCacheAddress implements JbossCacheAddress {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deedee this is incorrect, we should not tied to specific, like JBossCacheAddress, which seems specific to jboss cache, if we use Redis as the cache, will that cause problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JbossCacheAddress extend CacheAddress. Implementing JbossCacheAddress should work on both client. I think this approach make task more simple instead creating different classes for each clients and use AddressFactory to get it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deedee ok

@skyhit
Copy link
Collaborator

skyhit commented Mar 22, 2018

@deedee what is the purpose for this SortedCacheAddress? Basically, I think we should remove this class. or implement it inside the tc-cache.

@deedee
Copy link
Contributor Author

deedee commented Mar 22, 2018

@skyhit fell free to move it. But I think this class was required for 2 reasons:

  • To set exp time on jboss cache client, need to put inside JbossCacheAdress, where if we didn;t set this then max time will be used(current config set to 3days - too long).
  • Better to have a CacheAddress that can generate key from array of long, So we can use like gid. If not than key must be generate manually outside.

@skyhit skyhit merged commit fad295a into topcoder-archive:dev Mar 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants