Skip to content

Commit 6cc1532

Browse files
committed
CHRON-21 Support systems with a higher range of thread ids.
1 parent 89667a9 commit 6cc1532

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

chronicle/src/main/java/net/openhft/chronicle/VanillaChronicleConfig.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,20 @@
1616

1717
package net.openhft.chronicle;
1818

19+
import net.openhft.lang.Jvm;
20+
1921
import java.util.concurrent.TimeUnit;
2022

2123
public class VanillaChronicleConfig {
2224
public static final VanillaChronicleConfig DEFAULT = new VanillaChronicleConfig();
2325

24-
public static final long MIN_CYCLE_LENGTH = TimeUnit.MILLISECONDS.convert(1, TimeUnit.HOURS);
26+
public static final long MIN_CYCLE_LENGTH = TimeUnit.HOURS.toMillis(1);
2527

2628
/**
2729
* Number of most-significant bits used to hold the thread id in index entries.
2830
* The remaining least-significant bits of the index entry are used for the data offset info.
2931
*/
30-
public static final int THREAD_ID_BITS = 24;
32+
public static final int THREAD_ID_BITS = Integer.getInteger("os.max.pid.bits", Jvm.PID_BITS);
3133

3234
/**
3335
* Mask used to validate that the thread id does not exceed the allocated number of bits.

chronicle/src/main/java/net/openhft/chronicle/tools/WrappedExcerpt.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,4 +1225,14 @@ public void toString(Appendable sb, long start, long position, long end) {
12251225
public void alignPositionAddr(int alignment) {
12261226
common.alignPositionAddr(alignment);
12271227
}
1228+
1229+
@Override
1230+
public void asString(Appendable appendable) {
1231+
common.asString(appendable);
1232+
}
1233+
1234+
@Override
1235+
public CharSequence asString() {
1236+
return common.asString();
1237+
}
12281238
}

0 commit comments

Comments
 (0)