/** * Get affinity key field. * * @param typeId Binary object type ID. * @return Affinity key. */ public BinaryField affinityKeyField(int typeId) { // Fast path for already cached field. T1<BinaryField> fieldHolder = affKeyFields.get(typeId); if (fieldHolder != null) return fieldHolder.get(); // Slow path if affinity field is not cached yet. String name = binaryCtx.affinityKeyFieldName(typeId); if (name != null) { BinaryField field = binaryCtx.createField(typeId, name); affKeyFields.putIfAbsent(typeId, new T1<>(field)); return field; } else { affKeyFields.putIfAbsent(typeId, new T1<>(null)); return null; } }
affFieldName0 = ctx.affinityKeyFieldName(typeId);
/** * Get affinity key field. * * @param typeId Binary object type ID. * @return Affinity key. */ public BinaryField affinityKeyField(int typeId) { // Fast path for already cached field. T1<BinaryField> fieldHolder = affKeyFields.get(typeId); if (fieldHolder != null) return fieldHolder.get(); // Slow path if affinity field is not cached yet. String name = binaryCtx.affinityKeyFieldName(typeId); if (name != null) { BinaryField field = binaryCtx.createField(typeId, name); affKeyFields.putIfAbsent(typeId, new T1<>(field)); return field; } else { affKeyFields.putIfAbsent(typeId, new T1<BinaryField>(null)); return null; } }
affFieldName0 = ctx.affinityKeyFieldName(typeId);