public class SchemaServer
extends java.lang.Object
Constructor and Description |
---|
SchemaServer() |
Modifier and Type | Method and Description |
---|---|
static void |
checkIfRegistered(Schema schema) |
static int |
getExperimentalVersion()
Get the experimental schema version, which indicates that a schema is not guaranteed to be stable between H2O
releases.
|
static int |
getHighestSupportedVersion()
Get the highest schema version that we support.
|
static int |
getLatestOrHighestSupportedVersion()
Combines getLatestVersion() and getHighestSupportedVersion().
|
static int |
getLatestVersion()
Get the highest schema version number that we've encountered during schema registration.
|
static java.lang.Class<? extends Schema> |
getSchema(java.lang.String name)
Lookup schema by name.
|
static int |
getStableVersion() |
static void |
register(Schema schema)
Register the given schema class.
|
static void |
registerAllSchemasIfNecessary(Schema... schemas)
Find all schemas using reflection and register them.
|
static Schema |
schema(Iced impl) |
static Schema |
schema(int version,
java.lang.Class<? extends Iced> impl_class)
Deprecated.
|
static Schema |
schema(int version,
Iced impl)
Deprecated.
|
static java.lang.Class<? extends Schema> |
schemaClass(int version,
java.lang.String type)
Deprecated.
|
static java.util.Map<java.lang.String,java.lang.Class<? extends Schema>> |
schemas()
Return an immutable Map of all the schemas: schema_name -> schema Class.
|
public static int getLatestVersion()
public static int getHighestSupportedVersion()
public static int getLatestOrHighestSupportedVersion()
public static int getExperimentalVersion()
public static int getStableVersion()
public static void checkIfRegistered(Schema schema)
public static void register(Schema schema)
H2OFailException
- if there is a name collision, if the type parameters are bad, or if
the version is badpublic static void registerAllSchemasIfNecessary(Schema... schemas)
public static java.util.Map<java.lang.String,java.lang.Class<? extends Schema>> schemas()
public static java.lang.Class<? extends Schema> getSchema(java.lang.String name)
H2ONotFoundArgumentException
- if an appropriate schema is not foundpublic static java.lang.Class<? extends Schema> schemaClass(int version, java.lang.String type)
If a higher version is asked for than is available (e.g., if the highest version of Frame is FrameV2 and the client asks for the schema for (Frame, 17) then FrameV2 will be returned. This compatibility lookup is cached.
public static Schema schema(int version, Iced impl)
schema(int, java.lang.String)
public static Schema schema(int version, java.lang.Class<? extends Iced> impl_class)
version
- Version of the schema to create, or pass -1 to use the latest version.impl_class
- Create schema corresponds to this implementation class.H2OIllegalArgumentException
- if Class.newInstance() throwsschema(int, java.lang.String)