org.granite.messaging.jmf.persistence
Class JMFPersistentCollectionSnapshot

java.lang.Object
  extended by org.granite.messaging.jmf.persistence.JMFPersistentCollectionSnapshot
All Implemented Interfaces:
Externalizable, Serializable, PersistentCollectionSnapshot

public class JMFPersistentCollectionSnapshot
extends Object
implements PersistentCollectionSnapshot

Author:
Franck WOLFF
See Also:
Serialized Form

Field Summary
protected  String comparatorClassName
           
protected  boolean dirty
           
protected  Object[] elements
           
protected  boolean initialized
           
protected  boolean sorted
           
 
Constructor Summary
JMFPersistentCollectionSnapshot(boolean sorted, String detachedState)
           
JMFPersistentCollectionSnapshot(boolean initialized, String detachedState, boolean dirty, Collection<?> collection)
           
JMFPersistentCollectionSnapshot(boolean initialized, String detachedState, boolean dirty, Map<?,?> collection)
           
JMFPersistentCollectionSnapshot(String detachedState)
           
 
Method Summary
 String getComparatorClassName()
           
 String getDetachedState()
           
<T> Collection<T>
getElementsAsCollection()
           
<K,V> Map<K,V>
getElementsAsMap()
           
 boolean isDirty()
           
 boolean isInitialized()
           
 boolean isSorted()
           
<T> Comparator<T>
newComparator(ObjectInput in)
           
 void readCoreData(ObjectInput in)
           
 void readExternal(ObjectInput in)
           
 void readInitializationData(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialized

protected boolean initialized

dirty

protected boolean dirty

elements

protected Object[] elements

sorted

protected boolean sorted

comparatorClassName

protected String comparatorClassName
Constructor Detail

JMFPersistentCollectionSnapshot

public JMFPersistentCollectionSnapshot(String detachedState)

JMFPersistentCollectionSnapshot

public JMFPersistentCollectionSnapshot(boolean sorted,
                                       String detachedState)

JMFPersistentCollectionSnapshot

public JMFPersistentCollectionSnapshot(boolean initialized,
                                       String detachedState,
                                       boolean dirty,
                                       Collection<?> collection)

JMFPersistentCollectionSnapshot

public JMFPersistentCollectionSnapshot(boolean initialized,
                                       String detachedState,
                                       boolean dirty,
                                       Map<?,?> collection)
Method Detail

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface PersistentCollectionSnapshot

getDetachedState

public String getDetachedState()
Specified by:
getDetachedState in interface PersistentCollectionSnapshot

isDirty

public boolean isDirty()
Specified by:
isDirty in interface PersistentCollectionSnapshot

isSorted

public boolean isSorted()
Specified by:
isSorted in interface PersistentCollectionSnapshot

getComparatorClassName

public String getComparatorClassName()

newComparator

public <T> Comparator<T> newComparator(ObjectInput in)
                            throws ClassNotFoundException,
                                   InstantiationException,
                                   IllegalAccessException,
                                   InvocationTargetException,
                                   SecurityException,
                                   NoSuchMethodException
Specified by:
newComparator in interface PersistentCollectionSnapshot
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
InvocationTargetException
SecurityException
NoSuchMethodException

getElementsAsCollection

public <T> Collection<T> getElementsAsCollection()
Specified by:
getElementsAsCollection in interface PersistentCollectionSnapshot

getElementsAsMap

public <K,V> Map<K,V> getElementsAsMap()
Specified by:
getElementsAsMap in interface PersistentCollectionSnapshot

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

readInitializationData

public void readInitializationData(ObjectInput in)
                            throws IOException
Specified by:
readInitializationData in interface PersistentCollectionSnapshot
Throws:
IOException

readCoreData

public void readCoreData(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readCoreData in interface PersistentCollectionSnapshot
Throws:
IOException
ClassNotFoundException