com.sun.ejb.base.sfsb.util
Class ScrambledKeyGenerator
java.lang.Object
com.sun.ejb.base.sfsb.util.SimpleKeyGenerator
com.sun.ejb.base.sfsb.util.ScrambledKeyGenerator
- All Implemented Interfaces:
- SFSBUUIDUtil<SimpleKeyGenerator.SimpleSessionKey>, org.glassfish.ha.store.util.KeyTransformer<SimpleKeyGenerator.SimpleSessionKey>
public class ScrambledKeyGenerator
- extends SimpleKeyGenerator
A utility class that generates stateful session keys using two longs
The session id generated by this class is guarenteed to be unique as
long as the system clock is never reset to a previous value
The hashCode of the SessionKey generated by ScrambledKeyGenerator
also allows uniform distribution of keys when hashed in a HashMap
- Author:
- Mahesh Kannan
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScrambledKeyGenerator
public ScrambledKeyGenerator()
ScrambledKeyGenerator
public ScrambledKeyGenerator(byte[] ipAddress,
int port)
ScrambledKeyGenerator
public ScrambledKeyGenerator(long val)
createSessionKey
public SimpleKeyGenerator.SimpleSessionKey createSessionKey()
- Create and return the sessionKey.
- Specified by:
createSessionKey in interface SFSBUUIDUtil<SimpleKeyGenerator.SimpleSessionKey>- Overrides:
createSessionKey in class SimpleKeyGenerator
- Returns:
- the sessionKey object
Copyright © 2012 GlassFish Community. All Rights Reserved.