* @throws Exception
*/
public LinkedList buildElementInfo( String cacheName )
throws Exception
{
CompositeCache cache = cacheHub.getCache( cacheName );
Object[] keys = cache.getMemoryCache().getKeyArray();
// Attempt to sort keys according to their natural ordering. If that
// fails, get the key array again and continue unsorted.
try
{
Arrays.sort( keys );
}
catch ( Exception e )
{
keys = cache.getMemoryCache().getKeyArray();
}
LinkedList records = new LinkedList();
ICacheElement element;
IElementAttributes attributes;
CacheElementInfo elementInfo;
DateFormat format = DateFormat.getDateTimeInstance( DateFormat.SHORT, DateFormat.SHORT );
long now = System.currentTimeMillis();
for ( int i = 0; i < keys.length; i++ )
{
element = cache.getMemoryCache().getQuiet( (Serializable) keys[i] );
attributes = element.getElementAttributes();
elementInfo = new CacheElementInfo();