public enum BinarySearch extends Enum<BinarySearch>
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
static long |
findWithinCycle(@NotNull net.openhft.chronicle.wire.Wire key,
@NotNull Comparator<net.openhft.chronicle.wire.Wire> c,
int cycle,
@NotNull ExcerptTailer tailer,
@NotNull SingleChronicleQueue q,
@NotNull RollCycle rollCycle) |
static long |
search(@NotNull SingleChronicleQueue q,
@NotNull net.openhft.chronicle.wire.Wire key,
@NotNull Comparator<net.openhft.chronicle.wire.Wire> c)
returns the index or -1 if not found or the index if an exact match is found, an approximation in the form of -approximateIndex
or -1 if there was no searching to be done.
|
static BinarySearch |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BinarySearch[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BinarySearch INSTANCE
public static BinarySearch[] values()
for (BinarySearch c : BinarySearch.values()) System.out.println(c);
public static BinarySearch valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static long search(@NotNull @NotNull SingleChronicleQueue q, @NotNull @NotNull net.openhft.chronicle.wire.Wire key, @NotNull @NotNull Comparator<net.openhft.chronicle.wire.Wire> c) throws ParseException
Warning : This implementation is unreliable as index are an encoded 64bits, where we could use all the bits including the high bit which is used for the sign. At the moment it will work as its unlikely to reach a point where we store enough messages in the chronicle queue to use the high bit, having said this its possible in the future the high bit in the index ( used for the sign ) may be used, this implementation is unsafe as it relies on this bit not being set ( in other words set to zero ).
ParseException
public static long findWithinCycle(@NotNull @NotNull net.openhft.chronicle.wire.Wire key, @NotNull @NotNull Comparator<net.openhft.chronicle.wire.Wire> c, int cycle, @NotNull @NotNull ExcerptTailer tailer, @NotNull @NotNull SingleChronicleQueue q, @NotNull @NotNull RollCycle rollCycle)
Warning : This implementation is unreliable as index are an encoded 64bits, where we could use all the bits including the high bit which is used for the sign. At the moment it will work as its unlikely to reach a point where we store enough messages in the chronicle queue to use the high bit, having said this its possible in the future the high bit in the index ( used for the sign ) may be used, this implementation is unsafe as it relies on this bit not being set ( in other words set to zero ).
Copyright © 2021. All rights reserved.