org.glassfish.ha.store.util
Interface KeyTransformer<K>


public interface KeyTransformer<K>

Author:
Mahesh Kannan

Method Summary
 K byteArrayToKey(byte[] array, int startIndex, int len)
          Return the key from the byte[].
 byte[] keyToByteArray(K sessionKey)
          Called from BackingStore implementation to convert the given key into byte[]
 

Method Detail

keyToByteArray

byte[] keyToByteArray(K sessionKey)
Called from BackingStore implementation to convert the given key into byte[]


byteArrayToKey

K byteArrayToKey(byte[] array,
                 int startIndex,
                 int len)
Return the key from the byte[]. Two objects obtained from identical byte[] must satisfy both o1.equals(o2) and o1.hashCode() == o2.hashCode()

Returns:
the key


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.