mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-09 15:09:23 +00:00
Use an int for the pid in the registry
This commit is contained in:
@@ -25,7 +25,7 @@ public class DaemonInfo {
|
||||
private final String uid;
|
||||
private final String javaHome;
|
||||
private final String mavenHome;
|
||||
private final long pid;
|
||||
private final int pid;
|
||||
private final int address;
|
||||
private final int idleTimeout;
|
||||
private final String locale;
|
||||
@@ -35,7 +35,7 @@ public class DaemonInfo {
|
||||
private final long lastBusy;
|
||||
|
||||
public DaemonInfo(String uid, String javaHome, String mavenHome,
|
||||
long pid, int address, int idleTimeout,
|
||||
int pid, int address, int idleTimeout,
|
||||
String locale, List<String> options,
|
||||
DaemonState state, long lastIdle, long lastBusy) {
|
||||
this.uid = uid;
|
||||
@@ -63,7 +63,7 @@ public class DaemonInfo {
|
||||
return mavenHome;
|
||||
}
|
||||
|
||||
public long getPid() {
|
||||
public int getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
|
@@ -243,7 +243,7 @@ public class DaemonRegistry implements AutoCloseable {
|
||||
String uid = readString();
|
||||
String javaHome = readString();
|
||||
String mavenHome = readString();
|
||||
long pid = buffer.getLong();
|
||||
int pid = buffer.getInt();
|
||||
int address = buffer.getInt();
|
||||
int idle = buffer.getInt();
|
||||
String locale = readString();
|
||||
@@ -279,7 +279,7 @@ public class DaemonRegistry implements AutoCloseable {
|
||||
writeString(di.getUid());
|
||||
writeString(di.getJavaHome());
|
||||
writeString(di.getMavenHome());
|
||||
buffer.putLong(di.getPid());
|
||||
buffer.putInt(di.getPid());
|
||||
buffer.putInt(di.getAddress());
|
||||
buffer.putInt(di.getIdleTimeout());
|
||||
writeString(di.getLocale());
|
||||
|
@@ -43,7 +43,7 @@ public class DaemonRegistryTest {
|
||||
byte[] token = new byte[16];
|
||||
new Random().nextBytes(token);
|
||||
reg1.store(new DaemonInfo("the-uid", "/java/home/",
|
||||
"/data/reg/", 0x123456789012l, 7502, 65536,
|
||||
"/data/reg/", 0x12345678, 7502, 65536,
|
||||
Locale.getDefault().toLanguageTag(), Arrays.asList("-Xmx"),
|
||||
DaemonState.Idle, System.currentTimeMillis(), System.currentTimeMillis()));
|
||||
|
||||
|
Reference in New Issue
Block a user