/** * Create binary field. * * @param typeId Type ID. * @param fieldName Field name. * @return Binary field. */ public BinaryFieldImpl createField(int typeId, String fieldName) { BinarySchemaRegistry schemaReg = schemaRegistry(typeId); BinaryInternalMapper mapper = userTypeMapper(typeId); int fieldId = mapper.fieldId(typeId, fieldName); return new BinaryFieldImpl(this, typeId, schemaReg, fieldName, fieldId); }
BinarySchema schema = ctx.schemaRegistry(typeId).schema(schemaId); ctx.schemaRegistry(typeId).addSchema(schemaId, schema);
this.registered = registered; schemaReg = ctx.schemaRegistry(typeId);
/** * Gets the schema. * * @param cacheObjProc Cache object processor. * @param typeId Type id. * @param schemaId Schema id. */ public static int[] getSchema(CacheObjectBinaryProcessorImpl cacheObjProc, int typeId, int schemaId) { assert cacheObjProc != null; BinarySchemaRegistry schemaReg = cacheObjProc.binaryContext().schemaRegistry(typeId); BinarySchema schema = schemaReg.schema(schemaId); if (schema == null) { BinaryTypeImpl meta = (BinaryTypeImpl)cacheObjProc.metadata(typeId); if (meta != null) { for (BinarySchema typeSchema : meta.metadata().schemas()) { if (schemaId == typeSchema.schemaId()) { schema = typeSchema; break; } } } if (schema != null) { schemaReg.addSchema(schemaId, schema); } } return schema == null ? null : schema.fieldIds(); }
BinarySchemaRegistry schemaReg = ctx.schemaRegistry(typeId);
/** * Create binary field. * * @param typeId Type ID. * @param fieldName Field name. * @return Binary field. */ public BinaryFieldImpl createField(int typeId, String fieldName) { BinarySchemaRegistry schemaReg = schemaRegistry(typeId); BinaryInternalMapper mapper = userTypeMapper(typeId); int fieldId = mapper.fieldId(typeId, fieldName); return new BinaryFieldImpl(this, typeId, schemaReg, fieldName, fieldId); }
BinarySchema schema = ctx.schemaRegistry(typeId).schema(schemaId); ctx.schemaRegistry(typeId).addSchema(schemaId, schema);
this.registered = registered; schemaReg = ctx.schemaRegistry(typeId);
/** * Gets the schema. * * @param cacheObjProc Cache object processor. * @param typeId Type id. * @param schemaId Schema id. */ public static int[] getSchema(CacheObjectBinaryProcessorImpl cacheObjProc, int typeId, int schemaId) { assert cacheObjProc != null; BinarySchemaRegistry schemaReg = cacheObjProc.binaryContext().schemaRegistry(typeId); BinarySchema schema = schemaReg.schema(schemaId); if (schema == null) { BinaryTypeImpl meta = (BinaryTypeImpl)cacheObjProc.metadata(typeId); if (meta != null) { for (BinarySchema typeSchema : meta.metadata().schemas()) { if (schemaId == typeSchema.schemaId()) { schema = typeSchema; break; } } } if (schema != null) { schemaReg.addSchema(schemaId, schema); } } return schema == null ? null : schema.fieldIds(); }
BinarySchemaRegistry schemaReg = ctx.schemaRegistry(typeId);