public void store(@Nonnull final String category,@Nonnull final Rule rule) throws NotificationStoreException {
  Objects.requireNonNull(category);
  Preconditions.checkArgument(!category.isEmpty(),"category cannot be empty");
  Objects.requireNonNull(rule);
  Preconditions.checkState(rule.isValid(),"rule is not valid");
  final Optional<Context> fetchContext=fetchContext();
  final MapUpdate op=new MapUpdate();
  op.update(category,getUpdate(rule,fetchContext));
  final UpdateMap.Builder builder=new UpdateMap.Builder(LOCATION,op);
  if (fetchContext.isPresent()) {
    builder.withContext(fetchContext.get());
  }
  LOGGER.debug("Storing key (async): {}",LOCATION);
  try (Timer.Context context=storeTimer.time()){
    client.executeAsync(builder.build());
  }
 }

public void store ( @ Nonnull final String category , @ Nonnull final Rule rule ) throws NotificationStoreException { Objects . requireNonNull ( category ) ; Preconditions . checkArgument ( ! category . isEmpty ( ) , "category cannot be empty" ) ; Objects . requireNonNull ( rule ) ; Preconditions . checkState ( rule . isValid ( ) , "rule is not valid" ) ; final Optional < Context > fetchContext = fetchContext ( ) ; final MapUpdate op = new MapUpdate ( ) ; op . update ( category , getUpdate ( rule , fetchContext ) ) ; final UpdateMap . Builder builder = new UpdateMap . Builder ( LOCATION , op ) ; if ( fetchContext . isPresent ( ) ) { builder . withContext ( fetchContext . get ( ) ) ; } LOGGER . debug ( "Storing key (async): {}" , LOCATION ) ; try ( Timer . Context context = storeTimer . time ( ) ) { client . executeAsync ( builder . build ( ) ) ; } }
asynchronously store a rule
