org.apache.derby.iapi.services.io
Class FormatableInstanceGetter

java.lang.Object
  extended by org.apache.derby.iapi.services.io.FormatableInstanceGetter
All Implemented Interfaces:
InstanceGetter
Direct Known Subclasses:
BasicUUIDGetter, CoreDDFinderClassInfo, DepClassInfo, DTSClassInfo, GenericClassInfo, HeapClassInfo, TypesImplInstanceGetter

public abstract class FormatableInstanceGetter
extends java.lang.Object
implements InstanceGetter

Class that loads Formattables (typically from disk)through one level of indirection. A concrete implementation of this class is registered as the class to handle a number of format identifiers in RegisteredFormatIds. When the in-memory representation of RegisteredFormatIds is set up an instance of the concrete class will be created for each format identifier the class is registered for, and each instances will have its setFormatId() called once with the appropriate format identifier.
When a Formattable object is read from disk and its registered class is an instance of FormatableInstanceGetter the getNewInstance() method will be called to create the object. The implementation can use the fmtId field to determine the class of the instance to be returned.
Instances of FormatableInstanceGetter are system wide, that is there is a single set of RegisteredFormatIds per system.

See Also:
RegisteredFormatIds

Field Summary
protected  int fmtId
          Format identifier of the object
 
Constructor Summary
FormatableInstanceGetter()
           
 
Method Summary
 void setFormatId(int fmtId)
          Set the format identifier that this instance will be loading from disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.derby.iapi.services.loader.InstanceGetter
getNewInstance
 

Field Detail

fmtId

protected int fmtId
Format identifier of the object

Constructor Detail

FormatableInstanceGetter

public FormatableInstanceGetter()
Method Detail

setFormatId

public final void setFormatId(int fmtId)
Set the format identifier that this instance will be loading from disk.


Built on Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.