This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a88b3ab
commit 0f0d909
Showing
16 changed files
with
1,266 additions
and
1,266 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 16 additions & 16 deletions
32
src/main/java/com/googlecode/hibernate/memcached/HashCodeKeyStrategy.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,16 +1,16 @@ | ||
package com.googlecode.hibernate.memcached; | ||
|
||
/** | ||
* Transforms the key object using key.hashCode() | ||
* | ||
* @author Ray Krueger | ||
*/ | ||
public class HashCodeKeyStrategy extends AbstractKeyStrategy { | ||
|
||
protected String transformKeyObject(Object key) { | ||
int hashCode = key.hashCode(); | ||
log.debug("Transformed key [{}] to hashCode [{}]", key, hashCode); | ||
return String.valueOf(hashCode); | ||
} | ||
|
||
} | ||
package com.googlecode.hibernate.memcached; | ||
|
||
/** | ||
* Transforms the key object using key.hashCode() | ||
* | ||
* @author Ray Krueger | ||
*/ | ||
public class HashCodeKeyStrategy extends AbstractKeyStrategy { | ||
|
||
protected String transformKeyObject(Object key) { | ||
int hashCode = key.hashCode(); | ||
log.debug("Transformed key [{}] to hashCode [{}]", key, hashCode); | ||
return String.valueOf(hashCode); | ||
} | ||
|
||
} |
22 changes: 11 additions & 11 deletions
22
src/main/java/com/googlecode/hibernate/memcached/KeyStrategy.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,11 +1,11 @@ | ||
package com.googlecode.hibernate.memcached; | ||
|
||
/** | ||
* Strategy interface for parsing the parts used by {@link MemcachedCache} to generate cache keys. | ||
* | ||
* @author Ray Krueger | ||
*/ | ||
public interface KeyStrategy { | ||
|
||
String toKey(String regionName, long clearIndex, Object key); | ||
} | ||
package com.googlecode.hibernate.memcached; | ||
|
||
/** | ||
* Strategy interface for parsing the parts used by {@link MemcachedCache} to generate cache keys. | ||
* | ||
* @author Ray Krueger | ||
*/ | ||
public interface KeyStrategy { | ||
|
||
String toKey(String regionName, long clearIndex, Object key); | ||
} |
28 changes: 14 additions & 14 deletions
28
src/main/java/com/googlecode/hibernate/memcached/MemcacheClientFactory.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,14 +1,14 @@ | ||
package com.googlecode.hibernate.memcached; | ||
|
||
/** | ||
* Simple interface used to abstract the creation of the MemcachedClient | ||
* All implementers must have a constructor that takes an instance of | ||
* {@link com.googlecode.hibernate.memcached.PropertiesHelper}. | ||
* | ||
* @author Ray Krueger | ||
*/ | ||
public interface MemcacheClientFactory { | ||
|
||
Memcache createMemcacheClient() throws Exception; | ||
|
||
} | ||
package com.googlecode.hibernate.memcached; | ||
|
||
/** | ||
* Simple interface used to abstract the creation of the MemcachedClient | ||
* All implementers must have a constructor that takes an instance of | ||
* {@link com.googlecode.hibernate.memcached.PropertiesHelper}. | ||
* | ||
* @author Ray Krueger | ||
*/ | ||
public interface MemcacheClientFactory { | ||
|
||
Memcache createMemcacheClient() throws Exception; | ||
|
||
} |
Oops, something went wrong.