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 java.lang.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  org.jboss.cache.Fqn<?> fqn
           
 
Constructor Summary
protected CachedArray(org.jboss.cache.Fqn<?> fqn, java.lang.Class<?> type, PojoCacheImpl cache)
           
 
Method Summary
static CachedArray create(org.jboss.cache.Fqn<?> fqn, PojoCacheImpl cache, java.lang.Object originalArray)
           
 void destroy()
           
abstract  java.lang.Object get(int index)
           
 org.jboss.cache.Fqn<?> getFqn()
           
 int length()
           
static CachedArray load(org.jboss.cache.Fqn<?> fqn, PojoCacheImpl cache, java.lang.Class<?> type)
           
abstract  void set(int index, java.lang.Object element)
           
 java.lang.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 org.jboss.cache.Fqn<?> fqn
Constructor Detail

CachedArray

protected CachedArray(org.jboss.cache.Fqn<?> fqn,
                      java.lang.Class<?> type,
                      PojoCacheImpl cache)
Method Detail

load

public static CachedArray load(org.jboss.cache.Fqn<?> fqn,
                               PojoCacheImpl cache,
                               java.lang.Class<?> type)

create

public static CachedArray create(org.jboss.cache.Fqn<?> fqn,
                                 PojoCacheImpl cache,
                                 java.lang.Object originalArray)

getFqn

public org.jboss.cache.Fqn<?> getFqn()

set

public abstract void set(int index,
                         java.lang.Object element)

get

public abstract java.lang.Object get(int index)

writeInfo

protected void writeInfo()

destroy

public void destroy()

length

public int length()

toArray

public java.lang.Object toArray()


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