Code example for SortedMap

Methods: headMap, put

0
 
		_expungeExpiredToken(currentTime);
 
		String token = PortalUUIDUtil.generate();
 
		_tokens.put(expireTime, token);
 
		return token;
	} 
 
	private static void _expungeExpiredToken(long currentTime) {
		SortedMap<Long, String> headMap = _tokens.headMap(currentTime);
 
		headMap.clear();
	} 
 
	private static final SortedMap<Long, String> _tokens =
		Collections.synchronizedSortedMap(new TreeMap<Long, String>());
 
}