| | |
| | | String[] str = stringData.split(FIELD_SEPARATOR, 2); |
| | | if (!str[0].equals(GENERATION_ID_TAG)) |
| | | { |
| | | short serverId = -1; |
| | | int serverId = -1; |
| | | try |
| | | { |
| | | // <serverId> |
| | | serverId = new Short(str[0]); |
| | | serverId = new Integer(str[0]); |
| | | } catch (NumberFormatException e) |
| | | { |
| | | // should never happen |
| | |
| | | * @return the Database. |
| | | * @throws DatabaseException in case of underlying Exception. |
| | | */ |
| | | public Database getOrAddDb(Short serverId, String baseDn, Long generationId) |
| | | public Database getOrAddDb(int serverId, String baseDn, Long generationId) |
| | | throws DatabaseException |
| | | { |
| | | if (debugEnabled()) |
| | |
| | | serverId + " " + baseDn + " " + generationId); |
| | | try |
| | | { |
| | | String stringId = serverId.toString() + FIELD_SEPARATOR + baseDn; |
| | | String stringId = serverId + FIELD_SEPARATOR + baseDn; |
| | | |
| | | // Opens the database for the changes received from this server |
| | | // on this domain. Create it if it does not already exist. |
| | |
| | | * @param serverId The serverId to remove from the Db. |
| | | * |
| | | */ |
| | | public void clearServerId(String baseDn, Short serverId) |
| | | public void clearServerId(String baseDn, int serverId) |
| | | { |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo( |
| | |
| | | "clearServerId(baseDN=" + baseDn + ", serverId=" + serverId); |
| | | try |
| | | { |
| | | String stringId = serverId.toString() + FIELD_SEPARATOR + baseDn; |
| | | String stringId = serverId + FIELD_SEPARATOR + baseDn; |
| | | |
| | | // Deletes the record serverId/domain base Dn in the stateDb |
| | | byte[] byteId; |