public RemoteMultipartRequest(ScheduledExecutorService workExecutor, HttpClientFactory clientFactory, string method, Uri url, MultipartEntity multiPart, Database db, IDictionary<string, object> requestHeaders, RemoteRequestCompletionBlock onCompletion ) : base(workExecutor, clientFactory, method, url, null, db, requestHeaders, onCompletion ) { this.multiPart = multiPart; }
public RemoteRequest(ScheduledExecutorService workExecutor, HttpClientFactory clientFactory , string method, Uri url, object body, IDictionary<string, object> requestHeaders , RemoteRequestCompletionBlock onCompletion) { this.clientFactory = clientFactory; this.method = method; this.url = url; this.body = body; this.onCompletion = onCompletion; this.workExecutor = workExecutor; this.requestHeaders = requestHeaders; }
public Manager(FilePath directoryFile, ManagerOptions options) { this.directoryFile = directoryFile; this.options = (options != null) ? options : DefaultOptions; this.databases = new Dictionary <string, Database>(); this.replications = new AList <Replication>(); directoryFile.Mkdirs(); if (!directoryFile.IsDirectory()) { throw new IOException(string.Format("Unable to create directory for: %s", directoryFile )); } UpgradeOldDatabaseFiles(directoryFile); workExecutor = Executors.NewSingleThreadScheduledExecutor(); }
public Manager(Context context, ManagerOptions options) { Log.I(Database.Tag, "Starting Manager version: %s", Couchbase.Lite.Manager.Version ); this.context = context; this.directoryFile = context.GetFilesDir(); this.options = (options != null) ? options : DefaultOptions; this.databases = new Dictionary <string, Database>(); this.replications = new AList <Replication>(); directoryFile.Mkdirs(); if (!directoryFile.IsDirectory()) { throw new IOException(string.Format("Unable to create directory for: %s", directoryFile )); } UpgradeOldDatabaseFiles(directoryFile); workExecutor = Executors.NewSingleThreadScheduledExecutor(); }
public Manager(Context context, ManagerOptions options) { Log.I(Database.Tag, "Starting Manager version: %s", Couchbase.Lite.Manager.Version ); this.context = context; this.directoryFile = context.GetFilesDir(); this.options = (options != null) ? options : DefaultOptions; this.databases = new Dictionary<string, Database>(); this.replications = new AList<Replication>(); directoryFile.Mkdirs(); if (!directoryFile.IsDirectory()) { throw new IOException(string.Format("Unable to create directory for: %s", directoryFile )); } UpgradeOldDatabaseFiles(directoryFile); workExecutor = Executors.NewSingleThreadScheduledExecutor(); }
public Replication GetReplicator(Uri remote, HttpClientFactory httpClientFactory, bool push, bool continuous, ScheduledExecutorService workExecutor) { Replication result = GetActiveReplicator(remote, push); if (result != null) { return result; } result = push ? new Pusher(this, remote, continuous, httpClientFactory, workExecutor ) : new Puller(this, remote, continuous, httpClientFactory, workExecutor); return result; }
public Replication GetReplicator(Uri remote, bool push, bool continuous, ScheduledExecutorService workExecutor) { Replication replicator = GetReplicator(remote, null, push, continuous, workExecutor ); return replicator; }
public Manager(FilePath directoryFile, ManagerOptions options) { this.directoryFile = directoryFile; this.options = (options != null) ? options : DefaultOptions; this.databases = new Dictionary<string, Database>(); this.replications = new AList<Replication>(); directoryFile.Mkdirs(); if (!directoryFile.IsDirectory()) { throw new IOException(string.Format("Unable to create directory for: %s", directoryFile )); } UpgradeOldDatabaseFiles(directoryFile); workExecutor = Executors.NewSingleThreadScheduledExecutor(); }
public RemoteRequest(ScheduledExecutorService workExecutor, HttpClientFactory clientFactory , string method, Uri url, object body, Database db, IDictionary<string, object> requestHeaders, RemoteRequestCompletionBlock onCompletion) { this.clientFactory = clientFactory; this.method = method; this.url = url; this.body = body; this.onCompletion = onCompletion; this.workExecutor = workExecutor; this.requestHeaders = requestHeaders; this.db = db; this.request = CreateConcreteRequest(); Log.V(Log.TagSync, "%s: RemoteRequest created, url: %s", this, url); }
public Pusher(Database db, Uri remote, bool continuous, ScheduledExecutorService workExecutor) : this(db, remote, continuous, null, workExecutor) { }
public RemoteMultipartDownloaderRequest(ScheduledExecutorService workExecutor, HttpClientFactory clientFactory, string method, Uri url, object body, Database db, IDictionary<string , object> requestHeaders, RemoteRequestCompletionBlock onCompletion) : base(workExecutor , clientFactory, method, url, body, db, requestHeaders, onCompletion) { this.db = db; }
public Pusher(Database db, Uri remote, bool continuous, HttpClientFactory clientFactory , ScheduledExecutorService workExecutor) : base(db, remote, continuous, clientFactory , workExecutor) { createTarget = false; observing = false; }