Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tigrulya-exe
Copy link
Member

  • Implemented new cluster API endpoints
  • Added SearchableInMemoryService in order to be able to query services with in memory content in the same way as searchable DAOs
  • Added search support to the ClusterNodesManager

@Override
public SearchResult<EntityT> search(RequestT searchRequest, PageRequest<ColumnT> pageRequest) {
MutableLong filteredEntitiesCount = new MutableLong();
Stream<EntityT> fileteredStream = filteredStream(searchRequest)
Copy link

@VitekArkhipov VitekArkhipov May 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in fileteredStream

}

@Override
protected Stream<NodeCmdletMetrics> allEntitiesStream() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you really need to start return stream here? May be use Collection and get stream directly in filteredStream method?

Copy link
Member Author

@tigrulya-exe tigrulya-exe May 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, Collection would be more suitable for the ClusterNodesManager. However, returning a Stream would allow future possible implementations of the SearchableInMemoryService to operate on lazy streams without the need to load all entities into memory immediately.

Comment on lines 49 to 52
if (CollectionUtils.isEmpty(sortColumns)) {
return null;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to return emply list

Copy link
Member Author

@tigrulya-exe tigrulya-exe May 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, null and empty lists are equal in terms of signalling the absence of sorting fields. However, replaced it with a more conventional empty list

@tigrulya-exe tigrulya-exe force-pushed the feature/ADH-4409-new-cluster-api branch from b0fe927 to 5055df9 Compare May 29, 2024 07:58
@tigrulya-exe tigrulya-exe force-pushed the feature/ADH-4409-new-cluster-api branch from 5055df9 to 89ae8ca Compare May 30, 2024 10:45
@iamlapa iamlapa merged commit bac1ce4 into develop May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants