public class RemoteDatabaseChanges extends RemoteChangesClientBase<IDatabaseChanges,DatabaseConnectionState> implements IDatabaseChanges
Modifier and Type | Field and Description |
---|---|
protected DocumentConvention |
conventions |
protected boolean |
watchAllDataSubscriptions |
protected boolean |
watchAllDocs |
protected boolean |
watchAllIndexes |
protected boolean |
watchAllTransformers |
protected ConcurrentSkipListSet<String> |
watchedBulkInserts |
protected ConcurrentSkipListSet<String> |
watchedCollections |
protected ConcurrentSkipListSet<Long> |
watchedDataSubscriptions |
protected ConcurrentSkipListSet<String> |
watchedDocs |
protected ConcurrentSkipListSet<String> |
watchedIndexes |
protected ConcurrentSkipListSet<String> |
watchedPrefixes |
protected ConcurrentSkipListSet<String> |
watchedTypes |
counters, logger
Constructor and Description |
---|
RemoteDatabaseChanges(String url,
String apiKey,
HttpJsonRequestFactory jsonRequestFactory,
DocumentConvention conventions,
IDocumentStoreReplicationInformer replicationInformer,
Action0 onDispose,
Function4<String,Etag,String[],OperationMetadata,Boolean> tryResolveConflictByUsingRegisteredConflictListeners) |
Modifier and Type | Method and Description |
---|---|
IObservable<DataSubscriptionChangeNotification> |
forAllDataSubscriptions()
Subscribe to changes for all data subscriptions.
|
IObservable<DocumentChangeNotification> |
forAllDocuments()
Subscribe to changes for all documents.
|
IObservable<IndexChangeNotification> |
forAllIndexes()
Subscribe to changes for all indexes.
|
IObservable<ReplicationConflictNotification> |
forAllReplicationConflicts()
Subscribe to all replication conflicts.
|
IObservable<TransformerChangeNotification> |
forAllTransformers()
Subscribe to changes for all transformers.
|
IObservable<BulkInsertChangeNotification> |
forBulkInsert()
Subscribe to all bulk insert operation changes
|
IObservable<BulkInsertChangeNotification> |
forBulkInsert(UUID operationId)
Subscribe to all bulk insert operation changes that belong to a operation with given Id.
|
IObservable<DataSubscriptionChangeNotification> |
forDataSubscription(long subscriptionId)
Subscribe to changes for a specified data subscription.
|
IObservable<DocumentChangeNotification> |
forDocument(String docId)
Subscribe to changes for specified document only.
|
IObservable<DocumentChangeNotification> |
forDocumentsInCollection(Class<?> clazz)
Subscribe to changes for all documents that belong to specified collection (Raven-Entity-Name).
|
IObservable<DocumentChangeNotification> |
forDocumentsInCollection(String collectionName)
Subscribe to changes for all documents that belong to specified collection (Raven-Entity-Name).
|
IObservable<DocumentChangeNotification> |
forDocumentsOfType(Class<?> clazz)
Subscribe to changes for all documents that belong to specified type (Raven-Clr-Type).
|
IObservable<DocumentChangeNotification> |
forDocumentsOfType(String typeName)
Subscribe to changes for all documents that belong to specified type (Raven-Clr-Type).
|
IObservable<DocumentChangeNotification> |
forDocumentsStartingWith(String docIdPrefix)
Subscribe to changes for all documents that Id starts with given prefix.
|
IObservable<IndexChangeNotification> |
forIndex(String indexName)
Subscribe to changes for specified index only.
|
protected void |
notifySubscribers(String type,
RavenJObject value,
Iterable<Map.Entry<String,DatabaseConnectionState>> counters) |
protected void |
subscribeOnServer() |
void |
waitForAllPendingSubscriptions() |
addConnectionStatusChanged, clientSideHeartbeat, close, establishConnection, isConnected, logOnConnectionStatusChanged, onCompleted, onError, onNext, removeConnectionStatusChanges, send
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addConnectionStatusChanged, isConnected, removeConnectionStatusChanges
protected final ConcurrentSkipListSet<String> watchedDocs
protected final ConcurrentSkipListSet<String> watchedPrefixes
protected final ConcurrentSkipListSet<String> watchedTypes
protected final ConcurrentSkipListSet<String> watchedCollections
protected final ConcurrentSkipListSet<String> watchedIndexes
protected final ConcurrentSkipListSet<String> watchedBulkInserts
protected final ConcurrentSkipListSet<Long> watchedDataSubscriptions
protected boolean watchAllDocs
protected boolean watchAllIndexes
protected boolean watchAllTransformers
protected boolean watchAllDataSubscriptions
protected DocumentConvention conventions
public RemoteDatabaseChanges(String url, String apiKey, HttpJsonRequestFactory jsonRequestFactory, DocumentConvention conventions, IDocumentStoreReplicationInformer replicationInformer, Action0 onDispose, Function4<String,Etag,String[],OperationMetadata,Boolean> tryResolveConflictByUsingRegisteredConflictListeners)
protected void subscribeOnServer()
subscribeOnServer
in class RemoteChangesClientBase<IDatabaseChanges,DatabaseConnectionState>
protected void notifySubscribers(String type, RavenJObject value, Iterable<Map.Entry<String,DatabaseConnectionState>> counters)
notifySubscribers
in class RemoteChangesClientBase<IDatabaseChanges,DatabaseConnectionState>
public IObservable<IndexChangeNotification> forIndex(String indexName)
IDatabaseChanges
forIndex
in interface IDatabaseChanges
public IObservable<DocumentChangeNotification> forDocument(String docId)
IDatabaseChanges
forDocument
in interface IDatabaseChanges
public IObservable<DocumentChangeNotification> forAllDocuments()
IDatabaseChanges
forAllDocuments
in interface IDatabaseChanges
public IObservable<BulkInsertChangeNotification> forBulkInsert()
IDatabaseChanges
forBulkInsert
in interface IDatabaseChanges
public IObservable<BulkInsertChangeNotification> forBulkInsert(UUID operationId)
IDatabaseChanges
forBulkInsert
in interface IDatabaseChanges
public IObservable<DataSubscriptionChangeNotification> forAllDataSubscriptions()
IDatabaseChanges
forAllDataSubscriptions
in interface IDatabaseChanges
public IObservable<DataSubscriptionChangeNotification> forDataSubscription(long subscriptionId)
IDatabaseChanges
forDataSubscription
in interface IDatabaseChanges
public IObservable<IndexChangeNotification> forAllIndexes()
IDatabaseChanges
forAllIndexes
in interface IDatabaseChanges
public IObservable<TransformerChangeNotification> forAllTransformers()
IDatabaseChanges
forAllTransformers
in interface IDatabaseChanges
public IObservable<DocumentChangeNotification> forDocumentsStartingWith(String docIdPrefix)
IDatabaseChanges
forDocumentsStartingWith
in interface IDatabaseChanges
public IObservable<DocumentChangeNotification> forDocumentsInCollection(String collectionName)
IDatabaseChanges
forDocumentsInCollection
in interface IDatabaseChanges
public IObservable<DocumentChangeNotification> forDocumentsInCollection(Class<?> clazz)
IDatabaseChanges
forDocumentsInCollection
in interface IDatabaseChanges
public IObservable<DocumentChangeNotification> forDocumentsOfType(String typeName)
IDatabaseChanges
forDocumentsOfType
in interface IDatabaseChanges
public IObservable<DocumentChangeNotification> forDocumentsOfType(Class<?> clazz)
IDatabaseChanges
forDocumentsOfType
in interface IDatabaseChanges
public IObservable<ReplicationConflictNotification> forAllReplicationConflicts()
IDatabaseChanges
forAllReplicationConflicts
in interface IDatabaseChanges
public void waitForAllPendingSubscriptions()
waitForAllPendingSubscriptions
in interface IConnectableChanges
Copyright © 2016. All Rights Reserved.