|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.data.SchemaTupleFactory
public class SchemaTupleFactory
This is an implementation of TupleFactory that will instantiate SchemaTuple's. This class has nothing to do with the actual generation of code, and instead simply encapsulates the classes which allow for efficiently creating SchemaTuples.
Constructor Summary | |
---|---|
protected |
SchemaTupleFactory(Class<SchemaTuple<?>> clazz,
SchemaTuple.SchemaTupleQuickGenerator<? extends SchemaTuple<?>> generator)
|
Method Summary | |
---|---|
protected static SchemaTupleFactory |
getInstance(int id)
This method is the publicly facing method which returns a SchemaTupleFactory which will generate the SchemaTuple associated with the given identifier. |
static SchemaTupleFactory |
getInstance(Schema s)
|
static SchemaTupleFactory |
getInstance(Schema s,
boolean isAppendable)
|
static SchemaTupleFactory |
getInstance(Schema s,
boolean isAppendable,
SchemaTupleClassGenerator.GenContext context)
This method is the publicly facing method which returns a SchemaTupleFactory which will generate SchemaTuples of the given Schema. |
boolean |
isFixedSize()
|
static boolean |
isGeneratable(Schema s)
This method inspects a Schema to see whether or not a SchemaTuple implementation can be generated for the types present. |
SchemaTuple<?> |
newTuple()
|
SchemaTuple<?> |
newTuple(int size)
|
Class<SchemaTuple<?>> |
tupleClass()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected SchemaTupleFactory(Class<SchemaTuple<?>> clazz, SchemaTuple.SchemaTupleQuickGenerator<? extends SchemaTuple<?>> generator)
Method Detail |
---|
public static boolean isGeneratable(Schema s)
s
- as Schema
public SchemaTuple<?> newTuple()
newTuple
in interface TupleMaker<SchemaTuple<?>>
public SchemaTuple<?> newTuple(int size)
newTuple
in interface TupleMaker<SchemaTuple<?>>
public Class<SchemaTuple<?>> tupleClass()
public boolean isFixedSize()
protected static SchemaTupleFactory getInstance(int id)
id
- as int, means identifier
public static SchemaTupleFactory getInstance(Schema s, boolean isAppendable, SchemaTupleClassGenerator.GenContext context)
s
- the Schema generatedisAppendable
- whether or not the SchemaTuple should be appendablecontext
- the context in which we want a SchemaTupleFactory
public static SchemaTupleFactory getInstance(Schema s, boolean isAppendable)
public static SchemaTupleFactory getInstance(Schema s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |