Tabnine Logo
MappedBytes.release
Code IndexAdd Tabnine to your IDE (free)

How to use
release
method
in
net.openhft.chronicle.bytes.MappedBytes

Best Java code snippets using net.openhft.chronicle.bytes.MappedBytes.release (Showing top 18 results out of 315)

origin: OpenHFT/Chronicle-Queue

private void onCleanup() {
  mappedBytes.release();
}
origin: OpenHFT/Chronicle-Queue

private void onCleanup() {
  Closeable.closeQuietly(writePosition);
  Closeable.closeQuietly(indexing);
  mappedBytes.release();
}
origin: OpenHFT/Chronicle-Queue

@NotNull
@Override
public String dump() {
  MappedBytes bytes = MappedBytes.mappedBytes(mappedFile);
  try {
    bytes.readLimit(bytes.realCapacity());
    return Wires.fromSizePrefixedBlobs(bytes);
  } finally {
    bytes.release();
  }
}
origin: OpenHFT/Chronicle-Queue

@NotNull
@Override
public String dump() {
  MappedBytes bytes = MappedBytes.mappedBytes(mappedFile);
  try {
    bytes.readLimit(bytes.realCapacity());
    return Wires.fromSizePrefixedBlobs(bytes);
  } finally {
    bytes.release();
  }
}
origin: OpenHFT/Chronicle-Queue

bytes.release();
origin: OpenHFT/Chronicle-Queue

public void checkFileContents(@NotNull File file, String expected) throws FileNotFoundException {
  @NotNull MappedBytes bytes = MappedBytes.mappedBytes(file, ChronicleQueue.TEST_BLOCK_SIZE);
  bytes.readLimit(bytes.realCapacity());
  assertEquals(expected, Wires.fromSizePrefixedBlobs(bytes));
  bytes.release();
}
origin: OpenHFT/Chronicle-Queue

bytes.release();
try (@NotNull ChronicleQueue queue = binary(dir)
    .rollCycle(RollCycles.TEST4_DAILY)
origin: OpenHFT/Chronicle-Queue

    "  }\n" +
    "}\n", Wires.fromSizePrefixedBlobs(bytes.readPosition(0)));
bytes.release();
origin: OpenHFT/Chronicle-Queue

    "  lastAcknowledgedIndexReplicated: 0\n" +
    "}\n", Wires.fromSizePrefixedBlobs(bytes.readPosition(0)));
bytes.release();
origin: OpenHFT/Chronicle-Queue

private void removeEOF(Path path) throws IOException {
  long blockSize = 64 << 10;
  long chunkSize = OS.pageAlign(blockSize);
  long overlapSize = OS.pageAlign(blockSize / 4);
  final MappedBytes mappedBytes = MappedBytes.mappedBytes(path.toFile(), chunkSize, overlapSize, false);
  mappedBytes.reserve();
  try {
    final Wire wire = WireType.BINARY_LIGHT.apply(mappedBytes);
    final Bytes<?> bytes = wire.bytes();
    bytes.readLimit(bytes.capacity());
    bytes.readSkip(4);
    // move past header
    try (final SingleChronicleQueueStore qs = loadStore(wire)) {
      assertNotNull(qs);
      long l = qs.writePosition();
      long len = Wires.lengthOf(bytes.readVolatileInt(l));
      long eofOffset = l + len + 4L;
      bytes.writePosition(eofOffset);
      bytes.writeInt(0);
    }
  } finally {
    mappedBytes.release();
  }
}
origin: OpenHFT/Chronicle-Queue

mappedBytes.release();
origin: net.openhft/chronicle-queue

private void onCleanup() {
  mappedBytes.release();
}
origin: net.openhft/chronicle-bytes

@Override
public void close() {
  this.release();
}
origin: net.openhft/chronicle-bytes

@NotNull
public MappedBytes withSizes(long chunkSize, long overlapSize) {
  @NotNull MappedFile mappedFile2 = this.mappedFile.withSizes(chunkSize, overlapSize);
  if (mappedFile2 == this.mappedFile)
    return this;
  try {
    return mappedBytes(mappedFile2);
  } finally {
    mappedFile2.release();
    release();
  }
}
origin: net.openhft/chronicle-queue

private void onCleanup() {
  Closeable.closeQuietly(writePosition);
  Closeable.closeQuietly(indexing);
  mappedBytes.release();
}
origin: net.openhft/chronicle-queue

@NotNull
@Override
public String dump() {
  MappedBytes bytes = MappedBytes.mappedBytes(mappedFile);
  try {
    bytes.readLimit(bytes.realCapacity());
    return Wires.fromSizePrefixedBlobs(bytes);
  } finally {
    bytes.release();
  }
}
origin: net.openhft/chronicle-queue

@NotNull
@Override
public String dump() {
  MappedBytes bytes = MappedBytes.mappedBytes(mappedFile);
  try {
    bytes.readLimit(bytes.realCapacity());
    return Wires.fromSizePrefixedBlobs(bytes);
  } finally {
    bytes.release();
  }
}
origin: net.openhft/chronicle-queue

mappedBytes.release();
net.openhft.chronicle.bytesMappedBytesrelease

Popular methods of MappedBytes

  • mappedBytes
  • addressForWrite
  • readLimit
  • readPosition
  • reserve
  • writePosition
  • writeSkip
  • mappedFile
  • readRemaining
  • realCapacity
  • start
  • writeLimit
  • start,
  • writeLimit,
  • writeLong,
  • <init>,
  • acquireNextByteStore,
  • acquireNextByteStore0,
  • append8bit0,
  • appendUtf8,
  • bytesStore

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • getContentResolver (Context)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JCheckBox (javax.swing)
  • Join (org.hibernate.mapping)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now