Skip to content

Commit db84872

Browse files
committed
use region.nextTimestamp()
1 parent 4e6fe1a commit db84872

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/main/java/com/mc/hibernate/memcached/MemcachedCache.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,6 @@ public void lock(Object key) throws CacheException {
217217
public void unlock(Object key) throws CacheException {
218218
}
219219

220-
public long nextTimestamp() {
221-
return System.currentTimeMillis() / 100;
222-
}
223-
224220
public int getTimeout() {
225221
return cacheTimeSeconds;
226222
}

src/main/java/com/mc/hibernate/memcached/strategy/ReadWriteMemcachedNaturalIdRegionAccessStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public boolean afterInsert(Object key, Object value) throws CacheException {
4141
Lockable item = (Lockable) region.getCache().get(key);
4242

4343
if (item == null) {
44-
region.getCache().put(key, new Item(value, null, region.getCache().nextTimestamp()));
44+
region.getCache().put(key, new Item(value, null, region.nextTimestamp()));
4545
return true;
4646
} else {
4747
return false;

0 commit comments

Comments
 (0)