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;
 }
Пример #2
0
		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;
		}
Пример #3
0
 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();
 }
Пример #4
0
 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();
 }
Пример #5
0
 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();
 }
Пример #6
0
		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;
		}
Пример #7
0
		public Replication GetReplicator(Uri remote, bool push, bool continuous, ScheduledExecutorService
			 workExecutor)
		{
			Replication replicator = GetReplicator(remote, null, push, continuous, workExecutor
				);
			return replicator;
		}
Пример #8
0
 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);
 }
Пример #10
0
		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;
 }
Пример #12
-1
		public Pusher(Database db, Uri remote, bool continuous, HttpClientFactory clientFactory
			, ScheduledExecutorService workExecutor) : base(db, remote, continuous, clientFactory
			, workExecutor)
		{
			createTarget = false;
			observing = false;
		}