public Flowable<SynchronizedSpace> observe() {
    final String token;
    if (space != null) {
      String nextSyncUrl = space.nextSyncUrl();
      if (nextSyncUrl == null) {
        throw new IllegalArgumentException("Provided space for synchronization is corrupt.");
      } else {
        token = Util.queryParam(space.nextSyncUrl(), "sync_token");
      }
    } else {
      token = syncToken;
    }
    return client.cacheAll(true)
        .flatMap(new Function<Cache, Publisher<Response<SynchronizedSpace>>>() {
                   @Override
                   public Publisher<Response<SynchronizedSpace>> apply(Cache cache) {
                     return client.service.sync(
                         client.spaceId,
                         client.environmentId,
                         initial ? initial : null,
                         token,
                         initial && type != null ? type.getName() : null,
                         initial && type != null ? type.getContentType() : null);
                   }
                 }
        ).map(
            new Function<Response<SynchronizedSpace>, SynchronizedSpace>() {
              @Override
              public SynchronizedSpace apply(Response<SynchronizedSpace> synchronizedSpace) {
                return ResourceFactory.sync(synchronizedSpace, space, client);
              }
            }
        );
  }
public Flowable < SynchronizedSpace > observe ( ) { final String token ; if ( space != null ) { String nextSyncUrl = space . nextSyncUrl ( ) ; if ( nextSyncUrl == null ) { throw new IllegalArgumentException ( "Provided space for synchronization is corrupt." ) ; } else { token = Util . queryParam ( space . nextSyncUrl ( ) , "sync_token" ) ; } } else { token = syncToken ; } return client . cacheAll ( true ) . flatMap ( new Function < Cache , Publisher < Response < SynchronizedSpace > > > ( ) { @ Override public Publisher < Response < SynchronizedSpace > > apply ( Cache cache ) { return client . service . sync ( client . spaceId , client . environmentId , initial ? initial : null , token , initial && type != null ? type . getName ( ) : null , initial && type != null ? type . getContentType ( ) : null ) ; } } ) . map ( new Function < Response < SynchronizedSpace > , SynchronizedSpace > ( ) { @ Override public SynchronizedSpace apply ( Response < SynchronizedSpace > synchronizedSpace ) { return ResourceFactory . sync ( synchronizedSpace , space , client ) ; } } ) ; }
Returns an {@link Flowable} to which one can subscribe in order to fulfill this sync query.

@return {@link Flowable} instance.