src/main/java/org/lightcouch/Replication.java
public ReplicationResult trigger() {
		assertNotEmpty(source, "Source");
		assertNotEmpty(target, "Target");
		HttpResponse response = null;
		try {
			JsonObject json = createJson();
			if(log.isDebugEnabled()) {
				log.debug(json);
			}
			final URI uri = buildUri(dbc.getBaseUri()).path("_replicate").build();
			response = dbc.post(uri, json.toString());
			final InputStreamReader reader = new InputStreamReader(getStream(response), Charsets.UTF_8);
			return dbc.getGson().fromJson(reader, ReplicationResult.class);
		} finally {
			close(response);
		}
	}
public ReplicationResult trigger() {
		assertNotEmpty(source, "Source");
		assertNotEmpty(target, "Target");
		HttpResponse response = null;
		try {
			JsonObject json = createJson();
			if(log.isDebugEnabled()) {
				log.debug(json);
			}
			final URI uri = buildUri(dbc.getBaseUri()).path("_replicate").build();
			response = dbc.post(uri, json.toString());
			final InputStreamReader reader = new InputStreamReader(getStream(response), Charsets.UTF_8);
			return dbc.getGson().fromJson(reader, ReplicationResult.class);
		} finally {
			close(response);
		}
	}
public ReplicationResult trigger ( ) { assertNotEmpty ( source , "Source" ) ; assertNotEmpty ( target , "Target" ) ; HttpResponse response = null ; try { JsonObject json = createJson ( ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( json ) ; } final URI uri = buildUri ( dbc . getBaseUri ( ) ) . path ( "_replicate" ) . build ( ) ; response = dbc . post ( uri , json . toString ( ) ) ; final InputStreamReader reader = new InputStreamReader ( getStream ( response ) , Charsets . UTF_8 ) ; return dbc . getGson ( ) . fromJson ( reader , ReplicationResult . class ) ; } finally { close ( response ) ; } }
Triggers a replication request.
@return {@link ReplicationResult}
Triggers a replication request .