author | egahlin |
Fri, 09 Aug 2019 01:18:18 +0200 | |
branch | JEP-349-branch |
changeset 57690 | 9316d02dd4a5 |
parent 57604 | 838f9a7635b6 |
child 57861 | 86022e34ba63 |
permissions | -rw-r--r-- |
57361 | 1 |
/* |
2 |
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. |
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
package jdk.jfr.consumer; |
|
27 |
||
57372
50ca040843ea
Prepare infrastructure for multiple implementations of EventStream
egahlin
parents:
57361
diff
changeset
|
28 |
import java.io.IOException; |
57361 | 29 |
import java.nio.file.Path; |
57372
50ca040843ea
Prepare infrastructure for multiple implementations of EventStream
egahlin
parents:
57361
diff
changeset
|
30 |
import java.security.AccessControlContext; |
50ca040843ea
Prepare infrastructure for multiple implementations of EventStream
egahlin
parents:
57361
diff
changeset
|
31 |
import java.security.AccessController; |
57361 | 32 |
import java.time.Duration; |
57449 | 33 |
import java.time.Instant; |
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
34 |
import java.util.Arrays; |
57361 | 35 |
import java.util.Objects; |
36 |
import java.util.function.Consumer; |
|
37 |
||
57690
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
38 |
import jdk.jfr.internal.consumer.FileAccess; |
57372
50ca040843ea
Prepare infrastructure for multiple implementations of EventStream
egahlin
parents:
57361
diff
changeset
|
39 |
import jdk.jfr.internal.consumer.RecordingInput; |
50ca040843ea
Prepare infrastructure for multiple implementations of EventStream
egahlin
parents:
57361
diff
changeset
|
40 |
|
57361 | 41 |
/** |
42 |
* Implementation of an event stream that operates against a recording file. |
|
43 |
* |
|
44 |
*/ |
|
45 |
final class EventFileStream implements EventStream { |
|
46 |
||
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
47 |
private final static class FileStream extends AbstractEventStream { |
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
48 |
private static final int DEFAULT_ARRAY_SIZE = 100_000; |
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
49 |
|
57372
50ca040843ea
Prepare infrastructure for multiple implementations of EventStream
egahlin
parents:
57361
diff
changeset
|
50 |
private final RecordingInput input; |
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
51 |
|
57374 | 52 |
private ChunkParser chunkParser; |
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
53 |
private RecordedEvent[] sortedList; |
57385
7d9d4f629f6e
Make setReuse and setOrdered work across chunk boundaries. Improved unit tests
egahlin
parents:
57380
diff
changeset
|
54 |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
55 |
public FileStream(AccessControlContext acc, Path path) throws IOException { |
57690
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
56 |
super(acc, false); |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
57 |
this.input = new RecordingInput(path.toFile(), FileAccess.UNPRIVILIGED); |
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
58 |
; } |
57372
50ca040843ea
Prepare infrastructure for multiple implementations of EventStream
egahlin
parents:
57361
diff
changeset
|
59 |
|
50ca040843ea
Prepare infrastructure for multiple implementations of EventStream
egahlin
parents:
57361
diff
changeset
|
60 |
@Override |
57385
7d9d4f629f6e
Make setReuse and setOrdered work across chunk boundaries. Improved unit tests
egahlin
parents:
57380
diff
changeset
|
61 |
public void process() throws IOException { |
57690
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
62 |
final StreamConfiguration c1 = configuration; |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
63 |
long start = 0; |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
64 |
long end = Long.MAX_VALUE; |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
65 |
if (c1.getStartTime() != null) { |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
66 |
start = c1.getStartNanos(); |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
67 |
} |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
68 |
if (c1.getEndTime() != null) { |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
69 |
end = c1.getEndNanos(); |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
70 |
} |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
71 |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
72 |
chunkParser = new ChunkParser(input, c1.getReuse()); |
57385
7d9d4f629f6e
Make setReuse and setOrdered work across chunk boundaries. Improved unit tests
egahlin
parents:
57380
diff
changeset
|
73 |
while (!isClosed()) { |
57690
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
74 |
if (chunkParser.getStartNanos() > end) { |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
75 |
close(); |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
76 |
return; |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
77 |
} |
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
78 |
StreamConfiguration c2 = configuration; |
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
79 |
boolean ordered = c2.getOrdered(); |
57690
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
80 |
chunkParser.setFirstNanos(start); |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
81 |
chunkParser.setLastNanos(end); |
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
82 |
chunkParser.setReuse(c2.getReuse()); |
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
83 |
chunkParser.setOrdered(ordered); |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
84 |
chunkParser.resetEventCache(); |
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
85 |
chunkParser.setParserFilter(c2.getFiler()); |
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
86 |
chunkParser.updateEventParsers(); |
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
87 |
clearLastDispatch(); |
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
88 |
if (ordered) { |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
89 |
processOrdered(); |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
90 |
} else { |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
91 |
processUnordered(); |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
92 |
} |
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
93 |
runFlushActions(); |
57385
7d9d4f629f6e
Make setReuse and setOrdered work across chunk boundaries. Improved unit tests
egahlin
parents:
57380
diff
changeset
|
94 |
if (chunkParser.isLastChunk()) { |
7d9d4f629f6e
Make setReuse and setOrdered work across chunk boundaries. Improved unit tests
egahlin
parents:
57380
diff
changeset
|
95 |
return; |
7d9d4f629f6e
Make setReuse and setOrdered work across chunk boundaries. Improved unit tests
egahlin
parents:
57380
diff
changeset
|
96 |
} |
7d9d4f629f6e
Make setReuse and setOrdered work across chunk boundaries. Improved unit tests
egahlin
parents:
57380
diff
changeset
|
97 |
chunkParser = chunkParser.nextChunkParser(); |
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
98 |
} |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
99 |
} |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
100 |
|
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
101 |
private void processOrdered() throws IOException { |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
102 |
if (sortedList == null) { |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
103 |
sortedList = new RecordedEvent[DEFAULT_ARRAY_SIZE]; |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
104 |
} |
57376 | 105 |
RecordedEvent event; |
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
106 |
int index = 0; |
57376 | 107 |
while (true) { |
57374 | 108 |
event = chunkParser.readEvent(); |
109 |
if (event == null) { |
|
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
110 |
Arrays.sort(sortedList, 0, index, END_TIME); |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
111 |
for (int i = 0; i < index; i++) { |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
112 |
dispatch(sortedList[i]); |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
113 |
} |
57385
7d9d4f629f6e
Make setReuse and setOrdered work across chunk boundaries. Improved unit tests
egahlin
parents:
57380
diff
changeset
|
114 |
return; |
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
115 |
} |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
116 |
if (index == sortedList.length) { |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
117 |
RecordedEvent[] tmp = sortedList; |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
118 |
sortedList = new RecordedEvent[2 * tmp.length]; |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
119 |
System.arraycopy(tmp, 0, sortedList, 0, tmp.length); |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
120 |
} |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
121 |
sortedList[index++] = event; |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
122 |
} |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
123 |
} |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
124 |
|
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
125 |
private void processUnordered() throws IOException { |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
126 |
RecordedEvent event; |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
127 |
while (!isClosed()) { |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
128 |
event = chunkParser.readEvent(); |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
129 |
if (event == null) { |
57385
7d9d4f629f6e
Make setReuse and setOrdered work across chunk boundaries. Improved unit tests
egahlin
parents:
57380
diff
changeset
|
130 |
return; |
57374 | 131 |
} |
132 |
dispatch(event); |
|
133 |
} |
|
134 |
} |
|
135 |
||
57386 | 136 |
@Override |
137 |
public void close() { |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
138 |
setClosed(true);; |
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
139 |
runCloseActions(); |
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
140 |
try { |
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
141 |
input.close(); |
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
142 |
} catch (IOException e) { |
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
143 |
// ignore |
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
144 |
} |
57386 | 145 |
} |
57372
50ca040843ea
Prepare infrastructure for multiple implementations of EventStream
egahlin
parents:
57361
diff
changeset
|
146 |
} |
50ca040843ea
Prepare infrastructure for multiple implementations of EventStream
egahlin
parents:
57361
diff
changeset
|
147 |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
148 |
private final FileStream eventStream; |
57372
50ca040843ea
Prepare infrastructure for multiple implementations of EventStream
egahlin
parents:
57361
diff
changeset
|
149 |
|
57449 | 150 |
public EventFileStream(Path path, Instant from, Instant to) throws IOException { |
57361 | 151 |
Objects.requireNonNull(path); |
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
152 |
eventStream = new FileStream(AccessController.getContext(), path); |
57361 | 153 |
} |
154 |
||
155 |
@Override |
|
156 |
public void onEvent(Consumer<RecordedEvent> action) { |
|
157 |
Objects.requireNonNull(action); |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
158 |
eventStream.onEvent(action); |
57361 | 159 |
} |
160 |
||
161 |
@Override |
|
162 |
public void onEvent(String eventName, Consumer<RecordedEvent> action) { |
|
163 |
Objects.requireNonNull(eventName); |
|
164 |
Objects.requireNonNull(action); |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
165 |
eventStream.onEvent(eventName, action); |
57361 | 166 |
} |
167 |
||
168 |
@Override |
|
169 |
public void onFlush(Runnable action) { |
|
170 |
Objects.requireNonNull(action); |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
171 |
eventStream.onFlush(action); |
57361 | 172 |
} |
173 |
||
174 |
@Override |
|
175 |
public void onClose(Runnable action) { |
|
176 |
Objects.requireNonNull(action); |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
177 |
eventStream.addCloseAction(action); |
57361 | 178 |
} |
179 |
||
180 |
@Override |
|
181 |
public void close() { |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
182 |
eventStream.close(); |
57361 | 183 |
} |
184 |
||
185 |
@Override |
|
186 |
public boolean remove(Object action) { |
|
187 |
Objects.requireNonNull(action); |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
188 |
return eventStream.remove(action); |
57361 | 189 |
} |
190 |
||
191 |
@Override |
|
192 |
public void start() { |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
193 |
eventStream.start(0); |
57361 | 194 |
} |
195 |
||
57433 | 196 |
@Override |
57376 | 197 |
public void setReuse(boolean reuse) { |
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
198 |
eventStream.setReuse(reuse); |
57376 | 199 |
} |
200 |
||
57361 | 201 |
@Override |
202 |
public void startAsync() { |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
203 |
eventStream.startAsync(0); |
57361 | 204 |
} |
205 |
||
206 |
@Override |
|
207 |
public void awaitTermination(Duration timeout) { |
|
208 |
Objects.requireNonNull(timeout); |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
209 |
eventStream.awaitTermination(timeout); |
57361 | 210 |
} |
211 |
||
212 |
@Override |
|
213 |
public void awaitTermination() { |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
214 |
eventStream.awaitTermination(); |
57361 | 215 |
} |
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
216 |
|
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
217 |
@Override |
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
218 |
public void setOrdered(boolean ordered) { |
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
219 |
eventStream.setOrdered(ordered); |
57380
6a7e7743b82f
setOrdered and setReuse implemented for file stream, incl. unit tests
egahlin
parents:
57376
diff
changeset
|
220 |
} |
57449 | 221 |
|
222 |
@Override |
|
223 |
public void setStartTime(Instant startTime) { |
|
57604
838f9a7635b6
Cleaner stream reconfiguration + reduced allocation in JFR framework
egahlin
parents:
57452
diff
changeset
|
224 |
eventStream.setStartTime(startTime); |
57449 | 225 |
} |
57690
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
226 |
|
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
227 |
@Override |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
228 |
public void setEndTime(Instant endTime) { |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
229 |
eventStream.setEndTime(endTime); |
9316d02dd4a5
Add EventStream::setEndTime(...) and a first stab at priviliged access to local repository
egahlin
parents:
57604
diff
changeset
|
230 |
} |
57361 | 231 |
} |