ChronicleTools.warmup();
public void deleteOnExit() { ChronicleTools.deleteOnExit(chronicle.name()); }
public static void main(String... ignored) throws IOException { ChronicleTools.warmup(); ChronicleTools.deleteDirOnExit(pePath); IndexedChronicle pe2gw = new IndexedChronicle(pePath, ChronicleConfig.DEFAULT); ExcerptAppender excerpt = pe2gw.createAppender(); int sourceId = i + 1; String gw2pePath = tmp + "/demo/gw2pe" + sourceId; ChronicleTools.deleteDirOnExit(gw2pePath);
ChronicleTools.deleteDirOnExit(pathToChronicle); ChronicleTools.deleteOnExit(pathToChronicle);
/** * Take a text copy of the contents of the Excerpt without changing it's position. Can be called in the debugger. * * @param excerpt to get text from * @param position the position to get text from * @return up to 1024 bytes as text with `.` replacing special bytes. */ @NotNull private static String asString(@NotNull ExcerptCommon excerpt, long position) { return asString(excerpt, position, 1024); }
protected boolean readNextExcerpt() { try { if (!closed) { return doReadNextExcerpt(); } } catch (IOException e) { logIOException(logger, "Exception reading from socket", e); if (!closed) { builder.connectionListener().onError(connection.socketChannel(), e); } try { connection.close(); builder.connectionListener().onDisconnect(connection.socketChannel()); } catch (IOException e2) { logger.warn("Error closing socketChannel", e2); } } return false; }
public VanillaSelector open() throws IOException { this.selector = Selector.open(); try { final Class<?> selectorImplClass = Class.forName("sun.nio.ch.SelectorImpl", false, ChronicleTools.getSystemClassLoader()); if (selectorImplClass.isAssignableFrom(this.selector.getClass())) { this.selectionKeySet = new VanillaSelectionKeySet(); final Field selectedKeysField = selectorImplClass.getDeclaredField("selectedKeys"); selectedKeysField.setAccessible(true); final Field publicSelectedKeysField = selectorImplClass.getDeclaredField("publicSelectedKeys"); publicSelectedKeysField.setAccessible(true); selectedKeysField.set(this.selector, this.selectionKeySet); publicSelectedKeysField.set(this.selector, this.selectionKeySet); } } catch (Exception e) { LOGGER.error("", e); } return this; }
/** * Take a text copy of the contents of the Excerpt without changing it's position. Can be called in the debugger. * * @param excerpt to get text from * @param position the position to get text from * @return up to 1024 bytes as text with `.` replacing special bytes. */ @NotNull private static String asString(@NotNull ExcerptCommon excerpt, long position) { return asString(excerpt, position, 1024); }
protected boolean readNext() { if (!closed && !connection.isOpen() && shouldConnect()) { try { doReadNext(); } catch (IOException e) { logIOException(logger, "Exception reading from socket", e); if (!closed) { builder.connectionListener().onError(connection.socketChannel(), e); } } } return !closed && connection.isOpen() && readNextExcerpt(); }
@Override protected void doStart() { ChronicleTools.warmup(); this.basePath = (this.basePath.endsWith("/") ? this.basePath + getName() : this.basePath + "/" + getName()); try { chronicle = ChronicleQueueBuilder.indexed(basePath).synchronous(true).build(); appender = chronicle.createAppender(); } catch (Throwable t) { addError(t.getMessage(), t); } }
/** * Close the underlying chronicles. */ @Override public void close() { try { data.close(); if(deleteOnExit) { ChronicleTools.deleteOnExit(basePath); } } catch(IOException e) { throw new IllegalStateException(e.getMessage(), e); } }
/** * Take a text copy of the contents of the Excerpt without changing it's position. Can be called in the debugger. * * @param excerpt to get text from * @return 256 bytes as text with `.` replacing special bytes. */ @NotNull public static String asString(@NotNull ExcerptCommon excerpt) { return asString(excerpt, excerpt.position()); }
@Override protected void doStart() { ChronicleTools.warmup(); this.basePath = (this.basePath.endsWith("/") ? this.basePath + getName() : this.basePath + "/" + getName()); try { chronicle = ChronicleQueueBuilder.indexed(basePath).synchronous(true).build(); appender = chronicle.createAppender(); } catch (Throwable t) { addError(t.getMessage(), t); } }
public void deleteOnExit() { ChronicleTools.deleteOnExit(chronicle.name()); }
/** * Take a text copy of the contents of the Excerpt without changing it's position. Can be called in the debugger. * * @param excerpt to get text from * @return 256 bytes as text with `.` replacing special bytes. */ @NotNull public static String asString(@NotNull ExcerptCommon excerpt) { return asString(excerpt, excerpt.position()); }
System.exit(-1); ChronicleTools.warmup();
ChronicleTools.warmup(); data = new IndexedChronicle(basePath, config); lastId.set(data.findTheLastIndex());
ChronicleTools.warmup(); Chronicle chronicle = ChronicleQueueBuilder.indexed(cl.getOptionValue("path")).build(); ExcerptTailer ex = chronicle.createTailer();
ChronicleTools.warmup(); Chronicle chronicle = ChronicleQueueBuilder.indexed(cl.getOptionValue("path")).build(); ExcerptTailer ex = chronicle.createTailer();