Interface Subscription
On this page
io.realm.mongodb.sync
A subscription defines a specific server query and its metadata. The result of this query is continuously being synchronized with the device as long as the subscription is part of a SubscriptionSet with a state of SubscriptionSet.State.COMPLETE . Subscriptions are immutable once created, but they can be updated by using a MutableSubscriptionSet.addOrUpdate(Subscription) .
Method Summary
Modifier and Type | Method and Description |
---|---|
public static Subscription | Create an unmanaged anonymous subscription for a flexible sync enabled Realm. |
public static Subscription | Create an unmanaged named subscription for a flexible sync enabled Realm. |
public Date | getCreatedAt () Returns the timestamp for when this subscription was persisted. |
public String | getName () Returns the name of subscription or |
public String | Returns the type that is being queried. |
public String | getQuery () Returns the subscription query that is running on objects of type getObjectType() . |
public Date | getUpdatedAt () Returns the timestamp for when a persisted subscription was updated. |
Method Detail
create
Create an unmanaged anonymous subscription for a flexible sync enabled Realm. The subscription will not take effect until it has been stored using either MutableSubscriptionSet.add(Subscription) or MutableSubscriptionSet.addOrUpdate(Subscription) . Parameters
Returns the unmanaged subscription. |
Create an unmanaged named subscription for a flexible sync enabled Realm. The subscription will not take effect until it has been stored using either MutableSubscriptionSet.add(Subscription) or MutableSubscriptionSet.addOrUpdate(Subscription) . Parameters
Returns the unmanaged subscription. |
getCreatedAt
public Date getCreatedAt () |
---|
Returns the timestamp for when this subscription was persisted. This will return Returns the time this subscription was persisted, or |
getName
getObjectType
public String getObjectType () |
---|
Returns the type that is being queried. Returns the type that is being queried. |
getQuery
Returns the subscription query that is running on objects of type getObjectType() . Returns the query covered by this subscription. |
getUpdatedAt
public Date getUpdatedAt () |
---|
Returns the timestamp for when a persisted subscription was updated. This will return Returns the time this subscription was updated, or |