Class AbstractIoRegistry
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.structure.io.AbstractIoRegistry
 
- 
- All Implemented Interfaces:
- IoRegistry
 - Direct Known Subclasses:
- CustomId.CustomIdIoRegistry,- TinkerIoRegistryV1d0,- TinkerIoRegistryV2d0,- TinkerIoRegistryV3d0,- ToyIoRegistry
 
 public abstract class AbstractIoRegistry extends Object implements IoRegistry Base implementation of theIoRegistryinterface that provides implementation of the methods using a aHashMap. Providers should extend from this class if they have custom serializers to provide to IO instances. Simply register their classes to it via the providedregister(Class, Class, Object)method. It is important that implementations provide a zero-arg constructor as there may be cases where it will need to be constructed via reflection. As such, calls toregister(Class, Class, Object)should likely occur directly in the constructor.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
 
- 
- 
Field Summary- 
Fields inherited from interface org.apache.tinkerpop.gremlin.structure.io.IoRegistryIO_REGISTRY
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractIoRegistry()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.javatuples.Pair<Class,Object>>find(Class<? extends Io> builderClass)<S> List<org.javatuples.Pair<Class,S>>find(Class<? extends Io> builderClass, Class<S> serializerType)protected voidregister(Class<? extends Io> ioClass, Class clazz, Object serializer)Add a "serializer" for theMapper.
 
- 
- 
- 
Method Detail- 
registerprotected void register(Class<? extends Io> ioClass, Class clazz, Object serializer) Add a "serializer" for theMapper. Note that what is accepted as a "serializer" is implementation specific. AnIoimplementation will consult this registry for "serializer" classes it expects so refer to theIoimplementation to understand what is expected for these values.- Parameters:
- clazz- usually this is the class that is to be serialized - may be- null
- serializer- a serializer implementation
 
 - 
findpublic List<org.javatuples.Pair<Class,Object>> find(Class<? extends Io> builderClass) - Specified by:
- findin interface- IoRegistry
 
 
- 
 
-