public static < K > void removeAll ( Region < K , ? > region , Set < K > keys ) { if ( keys == null ) { throw new NullPointerException ( ) ; } if ( keys . isEmpty ( ) ) { // Nothing to do return ; } Function function = new RemoveAllFunction ( ) ; FunctionService . registerFunction ( function ) ; ResultCollector < ? , ? > rc = FunctionService . onRegion ( region ) . withFilter ( keys ) . withArgs ( region . getName ( ) ) . execute ( function ) ; // Obtain result from the collector to return // only after everything is done. rc . getResult ( ) ; }
Removes several entries from region in a single hop . On partitioned region execution is done simultaneously on all partitions .