Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,13 @@ protected synchronized ICommandStreamInfo put(CommandStreamKey csKey, ICommandSt
var newValidTime = csInfo.getValidTime().begin();

// error if command stream with same system/name/validTime already exists
// unless updating the same key
if (prevValidTime.equals(newValidTime))
{
if (replace && key.equals(csKey))
return map.put(csKey, csInfo);
throw new DataStoreException(DataStoreUtils.ERROR_EXISTING_COMMANDSTREAM);
}

// don't add if previous entry had a more recent valid time
// or if new entry is dated in the future
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,13 @@ protected synchronized IDataStreamInfo put(DataStreamKey dsKey, IDataStreamInfo
var newValidTime = dsInfo.getValidTime().begin();

// error if datastream with same system/name/validTime already exists
// unless updating the same key
if (prevValidTime.equals(newValidTime))
{
if (replace && key.equals(dsKey))
return map.put(dsKey, dsInfo);
throw new DataStoreException(DataStoreUtils.ERROR_EXISTING_DATASTREAM);
}

// don't add if previous entry had a more recent valid time
// or if new entry is dated in the future
Expand Down
Loading