Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.clustermate.service.lastaccess;
 
 
Partial com.fasterxml.storemate.store.lastaccess.LastAccessConverter implementation that simplifies actual implementations.
public abstract class LastAccessConverterBase<K extends EntryKey, E extends StoredEntry<K>>
    @Override
    public EntryLastAccessed createLastAccessed(E entrylong accessTime)
    {
        return new EntryLastAccessed(accessTimeentry.calculateMaxExpirationTime(),
                entry.getLastAccessUpdateMethod().asByte());
    }
    @Override
final   public EntryLastAccessed createLastAccessed(byte[] rawint offsetint length)
    {
        if (length != 17) {
            throw new IllegalArgumentException("LastAccessed entry length must be 17 bytes, was: "+length);
        }
        long accessTime = ByteUtil.getLongBE(rawoffset);
        long expirationTime = ByteUtil.getLongBE(rawoffset+8);
        byte type = raw[16];
        return new EntryLastAccessed(accessTimeexpirationTimetype);
    }
    @Override
    public byte[] createLastAccessedKey(E entry) {
        return createLastAccessedKey(entry.getKey(), entry.getLastAccessUpdateMethod());
    }
    
    @Override
    public abstract byte[] createLastAccessedKey(K keyLastAccessUpdateMethod method);
New to GrepCode? Check out our FAQ X