src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataDescriptor.java
branchJEP-349-branch
changeset 57360 5d043a159d5c
parent 50113 caf115bb98ad
child 58112 e7754025004b
equal deleted inserted replaced
57359:4cab5edc2950 57360:5d043a159d5c
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package jdk.jfr.internal;
    26 package jdk.jfr.internal;
    27 
    27 
    28 import java.io.DataInput;
       
    29 import java.io.DataOutput;
    28 import java.io.DataOutput;
    30 import java.io.IOException;
    29 import java.io.IOException;
    31 import java.util.ArrayList;
    30 import java.util.ArrayList;
    32 import java.util.Collection;
    31 import java.util.Collection;
    33 import java.util.List;
    32 import java.util.List;
    34 import java.util.Locale;
    33 import java.util.Locale;
    35 import java.util.TimeZone;
    34 import java.util.TimeZone;
    36 
    35 
    37 import jdk.jfr.EventType;
    36 import jdk.jfr.EventType;
       
    37 import jdk.jfr.internal.consumer.RecordingInput;
    38 
    38 
    39 /**
    39 /**
    40  * Metadata about a chunk
    40  * Metadata about a chunk
    41  */
    41  */
    42 public final class MetadataDescriptor {
    42 public final class MetadataDescriptor {
   212     final List<EventType> eventTypes = new ArrayList<>();
   212     final List<EventType> eventTypes = new ArrayList<>();
   213     final Collection<Type> types = new ArrayList<>();
   213     final Collection<Type> types = new ArrayList<>();
   214     long gmtOffset;
   214     long gmtOffset;
   215     String locale;
   215     String locale;
   216     Element root;
   216     Element root;
       
   217     public long metadataId;
   217 
   218 
   218     // package private
   219     // package private
   219     MetadataDescriptor() {
   220     MetadataDescriptor() {
   220     }
   221     }
   221 
   222 
   250 
   251 
   251     public String getLocale() {
   252     public String getLocale() {
   252         return locale;
   253         return locale;
   253     }
   254     }
   254 
   255 
   255     public static MetadataDescriptor read(DataInput input) throws IOException {
   256     public static MetadataDescriptor read(RecordingInput input) throws IOException {
   256         MetadataReader r = new MetadataReader(input);
   257         MetadataReader r = new MetadataReader(input);
   257         return r.getDescriptor();
   258         return r.getDescriptor();
   258     }
   259     }
   259 
   260 
   260     static void write(List<Type> types, DataOutput output) throws IOException {
   261     static void write(List<Type> types, DataOutput output) throws IOException {