@Test public void testPIDField() { final GUIDImplPrivate id = new GUIDImplPrivate(); assertEquals(GUIDImplPrivate.jvmProcessId(), id.getProcessId()); }
static final int jvmProcessId() { try { int processId = -1; final String customProcessId = SystemPropertyUtil.getNoCheck(FR_GOUV_VITAM_PROCESS_ID); if (customProcessId != null) { processId = parseProcessId(processId, customProcessId); } if (processId < 0) { final ClassLoader loader = getSystemClassLoader(); String value; final Object[] emptyObjects = new Object[0]; final Class<?>[] emptyClasses = new Class[0]; value = jvmProcessIdManagementFactory(loader, emptyObjects, emptyClasses); final int atIndex = value.indexOf('@'); if (atIndex >= 0) { value = value.substring(0, atIndex); } processId = parseProcessId(processId, value); if (processId < 0 || processId > MAX_PID) { processId = RANDOM.nextInt(MAX_PID + 1); } } return processId; } catch (final Exception e) { LOGGER.error("Error while getting JVMPID", e); return RANDOM.nextInt(MAX_PID + 1); } }
GUIDImplPrivate extends GUIDImpl { static final int jvmProcessId() { try { int processId = -1; final String customProcessId = SystemPropertyUtil.getNoCheck(FR_GOUV_VITAM_PROCESS_ID); if (customProcessId != null) { processId = parseProcessId(processId, customProcessId); } if (processId < 0) { final ClassLoader loader = getSystemClassLoader(); String value; final Object[] emptyObjects = new Object[0]; final Class<?>[] emptyClasses = new Class[0]; value = jvmProcessIdManagementFactory(loader, emptyObjects, emptyClasses); final int atIndex = value.indexOf('@'); if (atIndex >= 0) { value = value.substring(0, atIndex); } processId = parseProcessId(processId, value); if (processId < 0 || processId > MAX_PID) { processId = RANDOM.nextInt(MAX_PID + 1); } } return processId; } catch (final Exception e) { LOGGER.error("Error while getting JVMPID", e); return RANDOM.nextInt(MAX_PID + 1); } } }
GUIDImplPrivate extends GUIDImpl { static final int jvmProcessId() { try { int processId = -1; final String customProcessId = SystemPropertyUtil.getNoCheck(FR_GOUV_VITAM_PROCESS_ID); if (customProcessId != null) { processId = parseProcessId(processId, customProcessId); } if (processId < 0) { final ClassLoader loader = getSystemClassLoader(); String value; final Object[] emptyObjects = new Object[0]; final Class<?>[] emptyClasses = new Class[0]; value = jvmProcessIdManagementFactory(loader, emptyObjects, emptyClasses); final int atIndex = value.indexOf('@'); if (atIndex >= 0) { value = value.substring(0, atIndex); } processId = parseProcessId(processId, value); if (processId < 0 || processId > MAX_PID) { processId = RANDOM.nextInt(MAX_PID + 1); } } return processId; } catch (final Exception e) { LOGGER.error("Error while getting JVMPID", e); return RANDOM.nextInt(MAX_PID + 1); } } GUIDImplPrivate();   GUIDImplPrivate(final int objectTypeId);   GUIDImplPrivate(final int objectTypeId, final int tenantId);   GUIDImplPrivate(final boolean worm);   GUIDImplPrivate(final int objectTypeId, final boolean worm);   GUIDImplPrivate(final int objectTypeId, final int tenantId, final boolean worm);   GUIDImplPrivate(final int objectTypeId, final int tenantId, final int platformId);   GUIDImplPrivate(final int objectTypeId, final int tenantId, final int platformId,
        final boolean worm);   GUIDImplPrivate(final byte[] bytes);   GUIDImplPrivate(final String idsource); }
GUIDImplPrivate extends GUIDImpl { static final int jvmProcessId() { try { int processId = -1; final String customProcessId = SystemPropertyUtil.getNoCheck(FR_GOUV_VITAM_PROCESS_ID); if (customProcessId != null) { processId = parseProcessId(processId, customProcessId); } if (processId < 0) { final ClassLoader loader = getSystemClassLoader(); String value; final Object[] emptyObjects = new Object[0]; final Class<?>[] emptyClasses = new Class[0]; value = jvmProcessIdManagementFactory(loader, emptyObjects, emptyClasses); final int atIndex = value.indexOf('@'); if (atIndex >= 0) { value = value.substring(0, atIndex); } processId = parseProcessId(processId, value); if (processId < 0 || processId > MAX_PID) { processId = RANDOM.nextInt(MAX_PID + 1); } } return processId; } catch (final Exception e) { LOGGER.error("Error while getting JVMPID", e); return RANDOM.nextInt(MAX_PID + 1); } } GUIDImplPrivate();   GUIDImplPrivate(final int objectTypeId);   GUIDImplPrivate(final int objectTypeId, final int tenantId);   GUIDImplPrivate(final boolean worm);   GUIDImplPrivate(final int objectTypeId, final boolean worm);   GUIDImplPrivate(final int objectTypeId, final int tenantId, final boolean worm);   GUIDImplPrivate(final int objectTypeId, final int tenantId, final int platformId);   GUIDImplPrivate(final int objectTypeId, final int tenantId, final int platformId,
        final boolean worm);   GUIDImplPrivate(final byte[] bytes);   GUIDImplPrivate(final String idsource);  }
GUIDImplPrivate extends GUIDImpl { static final int jvmProcessId() { try { int processId = -1; final String customProcessId = SystemPropertyUtil.getNoCheck(FR_GOUV_VITAM_PROCESS_ID); if (customProcessId != null) { processId = parseProcessId(processId, customProcessId); } if (processId < 0) { final ClassLoader loader = getSystemClassLoader(); String value; final Object[] emptyObjects = new Object[0]; final Class<?>[] emptyClasses = new Class[0]; value = jvmProcessIdManagementFactory(loader, emptyObjects, emptyClasses); final int atIndex = value.indexOf('@'); if (atIndex >= 0) { value = value.substring(0, atIndex); } processId = parseProcessId(processId, value); if (processId < 0 || processId > MAX_PID) { processId = RANDOM.nextInt(MAX_PID + 1); } } return processId; } catch (final Exception e) { LOGGER.error("Error while getting JVMPID", e); return RANDOM.nextInt(MAX_PID + 1); } } GUIDImplPrivate();   GUIDImplPrivate(final int objectTypeId);   GUIDImplPrivate(final int objectTypeId, final int tenantId);   GUIDImplPrivate(final boolean worm);   GUIDImplPrivate(final int objectTypeId, final boolean worm);   GUIDImplPrivate(final int objectTypeId, final int tenantId, final boolean worm);   GUIDImplPrivate(final int objectTypeId, final int tenantId, final int platformId);   GUIDImplPrivate(final int objectTypeId, final int tenantId, final int platformId,
        final boolean worm);   GUIDImplPrivate(final byte[] bytes);   GUIDImplPrivate(final String idsource);   }