org.jboss.cache.pojo.collection
Class CachedArray

java.lang.Object
  extended by org.jboss.cache.pojo.collection.CachedArray
Direct Known Subclasses:
CachedObjectArray, CachedPrimitiveArray

public abstract class CachedArray
extends Object

A CachedArray is the base class for cache backed array access. It replicates the Java array contract.

Author:
Jason T. Greene

Field Summary
protected  PojoCacheImpl cache
           
protected  Fqn<?> fqn
           
 
Constructor Summary
protected CachedArray(Fqn<?> fqn, Class<?> type, PojoCacheImpl cache)
           
 
Method Summary
static CachedArray create(Fqn<?> fqn, PojoCacheImpl cache, Object originalArray)
           
 void destroy()
           
abstract  Object get(int index)
           
 Fqn<?> getFqn()
           
 int length()
           
static CachedArray load(Fqn<?> fqn, PojoCacheImpl cache, Class<?> type)
           
abstract  void set(int index, Object element)
           
 Object toArray()
           
protected  void writeInfo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected PojoCacheImpl cache

fqn

protected Fqn<?> fqn
Constructor Detail

CachedArray

protected CachedArray(Fqn<?> fqn,
                      Class<?> type,
                      PojoCacheImpl cache)
Method Detail

load

public static CachedArray load(Fqn<?> fqn,
                               PojoCacheImpl cache,
                               Class<?> type)

create

public static CachedArray create(Fqn<?> fqn,
                                 PojoCacheImpl cache,
                                 Object originalArray)

getFqn

public Fqn<?> getFqn()

set

public abstract void set(int index,
                         Object element)

get

public abstract Object get(int index)

writeInfo

protected void writeInfo()

destroy

public void destroy()

length

public int length()

toArray

public Object toArray()


Copyright 2008 JBoss, a division of Red Hat. All Rights Reserved.