How to search snapshot in all streams using Java API
![]()
I know how to search snapshot in particular stream using Java API. How to search snapshot in all the streams using API. The below cod is for searching in a particular stream but how to search in all streams. If I comment the line criteria2.setExactName(stream_name); it shows snapshot not found error.
IWorkspaceSearchCriteria criteria2 = IWorkspaceSearchCriteria.FACTORY.newInstance(); criteria2.setKind( IWorkspaceSearchCriteria.STREAMS ); criteria2.setExactName(stream_name); |
Accepted answer
![]()
#setExactName() is to specify the name of the snapshot.
By not using #setOwnerWorkspaceOptional(), the search will ignore the snapshot owner (ie. searches all streams). Kaushambi Singh selected this answer as the correct answer
|