Skip to content

Instantly share code, notes, and snippets.

View alexdorand's full-sized avatar

Alex Dorandish alexdorand

  • Vancouver, BC, Canada
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel>
<module name="elastic-search-practice_main" target="1.8" />
<module name="elastic-search-practice_test" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>
package com.folion.core.service;
import java.io.IOException;
import java.nio.charset.CoderResult;
import java.nio.file.*;
public class FileReader {
public void watch() throws IOException {
WatchService watcher = FileSystems.getDefault().newWatchService();
@alexdorand
alexdorand / FileReader.java
Created January 4, 2016 16:28
Sample File Reader
package com.folion.core.service;
import java.io.IOException;
import java.nio.charset.CoderResult;
import java.nio.file.*;
public class FileReader {
public void watch() throws IOException {
WatchService watcher = FileSystems.getDefault().newWatchService();
package com.folion.activity.dao;
import com.couchbase.client.core.time.Delay;
import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.document.RawJsonDocument;
import com.couchbase.client.java.error.CASMismatchException;
import com.couchbase.client.java.error.DocumentDoesNotExistException;
import com.couchbase.client.java.util.retry.RetryBuilder;
@alexdorand
alexdorand / CouchbaseActivityDao.java
Created April 30, 2015 04:52
Here is the class with Java Rx problem. You need to create a bucket called "geo" for this to work
package com.folion.activity.dao;
import com.couchbase.client.core.time.Delay;
import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.document.RawJsonDocument;
import com.couchbase.client.java.error.CASMismatchException;
import com.couchbase.client.java.error.DocumentDoesNotExistException;
import com.couchbase.client.java.util.retry.RetryBuilder;
@alexdorand
alexdorand / CouchbaseActivityDao.java
Created April 30, 2015 04:51
Here is the class. You need to create a bucket called "geo" for this to work
package com.folion.activity.dao;
import com.couchbase.client.core.time.Delay;
import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.document.RawJsonDocument;
import com.couchbase.client.java.error.CASMismatchException;
import com.couchbase.client.java.error.DocumentDoesNotExistException;
import com.couchbase.client.java.util.retry.RetryBuilder;