This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.couchbase.devex; | |
import com.couchbase.lite.Database; | |
import com.couchbase.lite.listener.LiteListener; | |
import com.couchbase.lite.replicator.Replication; | |
import javax.jmdns.JmDNS; | |
import javax.jmdns.ServiceEvent; | |
import javax.jmdns.ServiceListener; | |
import java.io.IOException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.couchbase.couchswitching; | |
import com.couchbase.client.core.BackpressureException; | |
import com.couchbase.client.core.RequestCancelledException; | |
import com.couchbase.client.deps.com.fasterxml.jackson.databind.JsonNode; | |
import com.couchbase.client.deps.com.fasterxml.jackson.databind.ObjectMapper; | |
import com.couchbase.client.java.AsyncBucket; | |
import com.couchbase.client.java.CouchbaseCluster; | |
import com.couchbase.client.java.document.RawJsonDocument; | |
import com.couchbase.client.java.error.TemporaryFailureException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.couchbase.advocacy.metrics.twitter; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.scheduling.annotation.Scheduled; | |
import org.springframework.social.twitter.api.Twitter; | |
import org.springframework.social.twitter.api.TwitterProfile; | |
import org.springframework.stereotype.Service; | |
import java.util.Date; | |
import java.util.Iterator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.couchbase.advocacy.metrics.twitter; | |
import org.springframework.data.annotation.Id; | |
import org.springframework.data.couchbase.core.mapping.Document; | |
import org.springframework.data.couchbase.core.mapping.Field; | |
@Document(expiry = 0) | |
public class TwitterUpdate { | |
@Id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.couchbase.advocacy.metrics; | |
import org.apache.commons.logging.Log; | |
import org.apache.commons.logging.LogFactory; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.boot.CommandLineRunner; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | |
import org.springframework.context.ConfigurableApplicationContext; | |
import org.springframework.context.annotation.Bean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.couchbase.advocacy</groupId> | |
<artifactId>couchbase-social-metrics</artifactId> | |
<version>1.0-SNAPSHOT</version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* (C) Copyright 2006-2013 Nuxeo SAS (http://nuxeo.com/) and contributors. | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the GNU Lesser General Public License | |
* (LGPL) version 2.1 which accompanies this distribution, and is available at | |
* http://www.gnu.org/licenses/lgpl.html | |
* | |
* This library is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(FeaturesRunner.class) | |
@Features({CoreFeature.class}) | |
public class TestClass { | |
@Inject | |
protected RuntimeHarness harness. | |
@Test | |
public void myTest() throws Exception { | |
// deploy the complete bundle |
NewerOlder