@ SuppressWarnings ( "unchecked" ) public static Single < Set < String > > keys ( CacheConfigBean cacheConfigBean , String pattern ) { return SingleRxXian . call ( CacheService . CACHE_SERVICE , "cacheKeys" , new JSONObject ( ) { { put ( "cacheConfig" , cacheConfigBean ) ; put ( "pattern" , pattern ) ; } } ) . map ( response -> { response . throwExceptionIfNotSuccess ( ) ; if ( response . getData ( ) instanceof Set ) { return ( Set < String > ) response . getData ( ) ; } else return new HashSet < String > ( ) { { addAll ( response . dataToTypedList ( String . class ) ) ; } } ; } ) ; }
get the keys who s value matches the pattern