Interface MutableSubscriptionSet

    • Method Detail

      • add

        Subscription add​(Subscription subscription)
        Adds a new unmanaged subscription to the subscription set.
        Parameters:
        subscription - unmanaged subscription to add.
        Returns:
        the newly added managed subscription.
        Throws:
        IllegalArgumentException - if a subscription matching the provided one already exists.
      • addOrUpdate

        Subscription addOrUpdate​(Subscription subscription)
        Add a new subscription or update an existing named subscription. It isn't possible to update an anonymous subscription. These must removed and re-inserted.
        Parameters:
        subscription - anonymous or named subscription created via Subscription.create(...), used to update a matching one within a specific set. It creates a new one in case there is no match..
        Returns:
        the updated or inserted managed subscription.
      • remove

        boolean remove​(Subscription subscription)
        Remove a managed subscription.
        Parameters:
        subscription - managed subscription to remove
        Returns:
        true if the subscription was removed, false if not.
        Throws:
        IllegalArgumentException - if the subscription provided is unmanaged. Only managed subscriptions can be used as input.
      • remove

        boolean remove​(String name)
        Remove a named subscription.
        Parameters:
        name - name of managed subscription to remove.
        Returns:
        true if the subscription was removed, false if not.
      • removeAll

        boolean removeAll​(String objectType)
        Remove all subscriptions on a given Subscription.getObjectType().
        Parameters:
        objectType - subscriptions on this object type will be removed.
        Returns:
        true if 1 or more subscriptions were removed, false if no subscriptions were removed.
      • removeAll

        <T extends RealmModel> boolean removeAll​(Class<T> clazz)
        Remove all subscriptions with queries on a given given model class.
        Parameters:
        clazz - subscriptions on this type will be removed.
        Returns:
        true if 1 or more subscriptions were removed, false if no subscriptions were removed.
      • removeAll

        boolean removeAll()
        Remove all current managed subscriptions.
        Returns:
        true if 1 or more subscriptions were removed, false if no subscriptions were removed.