org.jboss.cache.aop.collection
Class CachedListImpl

java.lang.Object
  extended by org.jboss.cache.aop.collection.CachedListAbstract
      extended by org.jboss.cache.aop.collection.CachedListImpl
All Implemented Interfaces:
java.lang.Iterable, java.util.Collection, java.util.List

public class CachedListImpl
extends CachedListAbstract
implements java.util.List

List implementation that uses cache as a backend store.

Author:
Ben Wang, Scott Marlow

Nested Class Summary
static class CachedListImpl.MyCachedSubListImpl
           
protected static class CachedListImpl.MyListIterator
           
 
Field Summary
protected  PojoCache cache_
           
protected  AbstractCollectionInterceptor interceptor_
           
 
Constructor Summary
CachedListImpl(PojoCache cache, AbstractCollectionInterceptor interceptor)
           
 
Method Summary
 void add(int index, java.lang.Object element)
           
 java.lang.Object get(int index)
           
protected  Fqn getFqn()
           
protected  DataNode getNode()
           
 int indexOf(java.lang.Object o)
           
 java.util.Iterator iterator()
           
 int lastIndexOf(java.lang.Object o)
           
 java.util.ListIterator listIterator()
           
 java.util.ListIterator listIterator(int index)
           
 java.lang.Object remove(int index)
           
 java.lang.Object set(int index, java.lang.Object element)
           
 int size()
           
 java.util.List subList(int fromIndex, int toIndex)
           
 
Methods inherited from class org.jboss.cache.aop.collection.CachedListAbstract
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

cache_

protected PojoCache cache_

interceptor_

protected AbstractCollectionInterceptor interceptor_
Constructor Detail

CachedListImpl

public CachedListImpl(PojoCache cache,
                      AbstractCollectionInterceptor interceptor)
Method Detail

getFqn

protected Fqn getFqn()

getNode

protected DataNode getNode()

get

public java.lang.Object get(int index)
Specified by:
get in interface java.util.List

size

public int size()
Specified by:
size in interface java.util.Collection
Specified by:
size in interface java.util.List

set

public java.lang.Object set(int index,
                            java.lang.Object element)
Specified by:
set in interface java.util.List

add

public void add(int index,
                java.lang.Object element)
Specified by:
add in interface java.util.List

indexOf

public int indexOf(java.lang.Object o)
Specified by:
indexOf in interface java.util.List

lastIndexOf

public int lastIndexOf(java.lang.Object o)
Specified by:
lastIndexOf in interface java.util.List

remove

public java.lang.Object remove(int index)
Specified by:
remove in interface java.util.List

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface java.util.Collection
Specified by:
iterator in interface java.util.List

subList

public java.util.List subList(int fromIndex,
                              int toIndex)
Specified by:
subList in interface java.util.List

listIterator

public java.util.ListIterator listIterator()
Specified by:
listIterator in interface java.util.List

listIterator

public java.util.ListIterator listIterator(int index)
Specified by:
listIterator in interface java.util.List


Copyright 1998-2005 JBoss Inc . All Rights Reserved.