Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.verifiers.comm.bridge
Class ISeriesObjectCache

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by com.ibm.etools.iseries.edit.verifiers.comm.bridge.ISeriesObjectCache
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess

public class ISeriesObjectCache
extends ArrayList

A local cache used by the CODE comm bridge for caching ISeriesFile objects.

See Also:
Serialized Form

Nested Class Summary
protected  class ISeriesObjectCache.InternalObjectStore
          Inner class for associating a record list with its corresponding library/file
 
Field Summary
protected static com.ibm.etools.iseries.edit.verifiers.comm.bridge.AbstractLastAccessedCache _instance
           
protected static JavaToCOutputStream _key
           
static String copyright
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
protected ISeriesObjectCache(int maxSize)
          Constructor for LastAccessedCache.
 
Method Summary
 boolean add(IQSYSObject object, String library)
           
 boolean add(Object obj)
          Override of the add method to add the element to the beginning of the list and to make sure the max size of the list has not exceeded the max size limit.
protected  IQSYSFile findFile(String libraryName, String fileName)
          Helper method for finding files since this is the most common operation.
protected  IQSYSObject findObject(String libraryName, String objectName, String objectType)
          Lookup ISeriesObject with specified name
static ISeriesObjectCache getInstance(JavaToCOutputStream key)
          Return an instance of this cache for the current comm session as specified by the JavaToCOutputStream instance
protected  void moveToFront(int index)
          Move the element at index to the front of the linked list
 
Methods inherited from class java.util.ArrayList
add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

_instance

protected static com.ibm.etools.iseries.edit.verifiers.comm.bridge.AbstractLastAccessedCache _instance

_key

protected static JavaToCOutputStream _key
Constructor Detail

ISeriesObjectCache

protected ISeriesObjectCache(int maxSize)
Constructor for LastAccessedCache.

Method Detail

findFile

protected IQSYSFile findFile(String libraryName,
                             String fileName)
Helper method for finding files since this is the most common operation.


findObject

protected IQSYSObject findObject(String libraryName,
                                 String objectName,
                                 String objectType)
Lookup ISeriesObject with specified name


getInstance

public static ISeriesObjectCache getInstance(JavaToCOutputStream key)
Return an instance of this cache for the current comm session as specified by the JavaToCOutputStream instance


add

public boolean add(IQSYSObject object,
                   String library)
See Also:
Collection.add(Object)

moveToFront

protected void moveToFront(int index)
Move the element at index to the front of the linked list


add

public boolean add(Object obj)
Override of the add method to add the element to the beginning of the list and to make sure the max size of the list has not exceeded the max size limit. If it has then the element at the end of the list is dropped.

Specified by:
add in interface Collection
Specified by:
add in interface List
Overrides:
add in class ArrayList
See Also:
LinkedList.addFirst(Object)

Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.