You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Changes API: How to subscribe to transformer changes?

All transformer changes can be tracked using forAllTransformers method.

Syntax

public IObservable<TransformerChangeNotification> forAllTransformers();
Return value
IObservable<TransformerChangeNotification> Observable that allows to add subscriptions to notifications for all transformers.

Type: IObservable<TransformerChangeNotification>
Observable that allows to add subscriptions to notifications for all transformers.

Example

store
  .changes()
  .forAllTransformers()
  .subscribe(Observers.create(new Action1<TransformerChangeNotification>() {
    @Override
    public void apply(TransformerChangeNotification change) {
      switch (change.getType()) {
        case TRANSFORMER_ADDED:
          // do something
          break;
        case TRANSFORMER_REMOVED:
          // do something
          break;
        default:
          break;
      }
    }
  }));