@@ -34,7 +34,7 @@ final class ProfileMarshaler extends MarshalerWithSize {
34
34
private final List <Integer > comment ;
35
35
private final int defaultSampleType ;
36
36
private final byte [] profileId ;
37
- private final KeyValueMarshaler [] attributeMarshalers ;
37
+ private final List < Integer > attributeIndices ;
38
38
private final int droppedAttributesCount ;
39
39
private final byte [] originalPayloadFormatUtf8 ;
40
40
private final ByteBuffer originalPayload ;
@@ -50,8 +50,8 @@ static ProfileMarshaler create(ProfileData profileData) {
50
50
LocationMarshaler .createRepeated (profileData .getLocationTable ());
51
51
FunctionMarshaler [] functionMarshalers =
52
52
FunctionMarshaler .createRepeated (profileData .getFunctionTable ());
53
- KeyValueMarshaler [] attributeMarshalers =
54
- KeyValueMarshaler .createForAttributes (profileData .getAttributes ());
53
+ KeyValueMarshaler [] attributeTableMarshalers =
54
+ KeyValueMarshaler .createForAttributes (profileData .getAttributeTable ());
55
55
AttributeUnitMarshaler [] attributeUnitsMarshalers =
56
56
AttributeUnitMarshaler .createRepeated (profileData .getAttributeUnits ());
57
57
LinkMarshaler [] linkMarshalers = LinkMarshaler .createRepeated (profileData .getLinkTable ());
@@ -63,7 +63,7 @@ static ProfileMarshaler create(ProfileData profileData) {
63
63
}
64
64
65
65
int droppedAttributesCount =
66
- profileData .getTotalAttributeCount () - profileData .getAttributes ().size ();
66
+ profileData .getTotalAttributeCount () - profileData .getAttributeIndices ().size ();
67
67
68
68
return new ProfileMarshaler (
69
69
sampleTypeMarshalers ,
@@ -72,7 +72,7 @@ static ProfileMarshaler create(ProfileData profileData) {
72
72
locationMarshalers ,
73
73
profileData .getLocationIndices (),
74
74
functionMarshalers ,
75
- attributeMarshalers ,
75
+ attributeTableMarshalers ,
76
76
attributeUnitsMarshalers ,
77
77
linkMarshalers ,
78
78
convertedStrings ,
@@ -83,7 +83,7 @@ static ProfileMarshaler create(ProfileData profileData) {
83
83
profileData .getCommentStrIndices (),
84
84
profileData .getDefaultSampleTypeStringIndex (),
85
85
profileData .getProfileIdBytes (),
86
- KeyValueMarshaler . createForAttributes ( profileData .getAttributes () ),
86
+ profileData .getAttributeIndices ( ),
87
87
droppedAttributesCount ,
88
88
MarshalerUtil .toBytes (profileData .getOriginalPayloadFormat ()),
89
89
profileData .getOriginalPayload ());
@@ -107,7 +107,7 @@ private ProfileMarshaler(
107
107
List <Integer > comment ,
108
108
int defaultSampleType ,
109
109
byte [] profileId ,
110
- KeyValueMarshaler [] attributeMarshalers ,
110
+ List < Integer > attributeIndices ,
111
111
int droppedAttributesCount ,
112
112
byte [] originalPayloadFormat ,
113
113
ByteBuffer originalPayload ) {
@@ -130,7 +130,7 @@ private ProfileMarshaler(
130
130
comment ,
131
131
defaultSampleType ,
132
132
profileId ,
133
- attributeMarshalers ,
133
+ attributeIndices ,
134
134
droppedAttributesCount ,
135
135
originalPayloadFormat ,
136
136
originalPayload ));
@@ -151,7 +151,7 @@ private ProfileMarshaler(
151
151
this .comment = comment ;
152
152
this .defaultSampleType = defaultSampleType ;
153
153
this .profileId = profileId ;
154
- this .attributeMarshalers = attributeMarshalers ;
154
+ this .attributeIndices = attributeIndices ;
155
155
this .droppedAttributesCount = droppedAttributesCount ;
156
156
this .originalPayloadFormatUtf8 = originalPayloadFormat ;
157
157
this .originalPayload = originalPayload ;
@@ -177,7 +177,7 @@ protected void writeTo(Serializer output) throws IOException {
177
177
output .serializeInt32 (Profile .DEFAULT_SAMPLE_TYPE_STRINDEX , defaultSampleType );
178
178
179
179
output .serializeBytes (Profile .PROFILE_ID , profileId );
180
- output .serializeRepeatedMessage (Profile .ATTRIBUTES , attributeMarshalers );
180
+ output .serializeRepeatedInt32 (Profile .ATTRIBUTE_INDICES , attributeIndices );
181
181
output .serializeUInt32 (Profile .DROPPED_ATTRIBUTES_COUNT , droppedAttributesCount );
182
182
output .serializeString (Profile .ORIGINAL_PAYLOAD_FORMAT , originalPayloadFormatUtf8 );
183
183
output .serializeByteBuffer (Profile .ORIGINAL_PAYLOAD , originalPayload );
@@ -201,7 +201,7 @@ private static int calculateSize(
201
201
List <Integer > comment ,
202
202
int defaultSampleType ,
203
203
byte [] profileId ,
204
- KeyValueMarshaler [] attributeMarshalers ,
204
+ List < Integer > attributeIndices ,
205
205
int droppedAttributesCount ,
206
206
byte [] originalPayloadFormat ,
207
207
ByteBuffer originalPayload ) {
@@ -225,7 +225,7 @@ private static int calculateSize(
225
225
size += MarshalerUtil .sizeInt64 (Profile .DEFAULT_SAMPLE_TYPE_STRINDEX , defaultSampleType );
226
226
227
227
size += MarshalerUtil .sizeBytes (Profile .PROFILE_ID , profileId );
228
- size += MarshalerUtil .sizeRepeatedMessage (Profile .ATTRIBUTES , attributeMarshalers );
228
+ size += MarshalerUtil .sizeRepeatedInt32 (Profile .ATTRIBUTE_INDICES , attributeIndices );
229
229
size += MarshalerUtil .sizeInt32 (Profile .DROPPED_ATTRIBUTES_COUNT , droppedAttributesCount );
230
230
size += MarshalerUtil .sizeBytes (Profile .ORIGINAL_PAYLOAD_FORMAT , originalPayloadFormat );
231
231
size += MarshalerUtil .sizeByteBuffer (Profile .ORIGINAL_PAYLOAD , originalPayload );
0 commit comments