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
import org.apache.commons.pool.impl.GenericObjectPool; | |
import redis.clients.jedis.*; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
public class RoundRobinJedis { |
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 redis.clients.jedis; | |
import org.apache.commons.pool.BasePoolableObjectFactory; | |
import org.apache.commons.pool.PoolableObjectFactory; | |
import org.apache.commons.pool.impl.GenericObjectPool; | |
import redis.clients.jedis.exceptions.JedisConnectionException; | |
import redis.clients.jedis.exceptions.JedisException; | |
import redis.clients.util.Pool; | |
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 redis.clients.jedis; | |
import org.apache.commons.pool.impl.GenericObjectPool; | |
import redis.clients.util.Pool; | |
import redis.clients.util.SafeEncoder; | |
import java.util.*; | |
public class UniJedis2 implements JedisCommands, BinaryJedisCommands { |
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 redis.clients.jedis; | |
import org.hypergraphdb.util.HGUtils; | |
import redis.clients.jedis.BinaryClient.LIST_POSITION; | |
import redis.clients.util.Pool; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Set; |
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 test | |
import redis.clients.util.Pool | |
import redis.clients.jedis._ | |
class UnifiedJedisScala3 { | |
val readPool: Pool[Jedis] | |
val masterPool: Pool[Jedis] | |
val currentDB: Int = 0; | |
val redundancySwitch: Int = 3; |
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 test | |
import scala.annotation.tailrec | |
import scala.collection.JavaConversions._ | |
import scala.reflect.BeanProperty | |
sealed abstract class Text{ | |
override def toString():String | |
//ToDo -- checkout Type bounds |
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
import test.JHGDB.TestCommons._ | |
import org.hypergraphdb.HGQuery.hg | |
import scala.collection.JavaConversions._ | |
import org.hypergraphdb.query.AtomTypeCondition | |
import test.Text.Word3 | |
import java.util.ArrayList | |
import org.hypergraphdb.indexing.{ByTargetIndexer, ByPartIndexer} | |
import org.hypergraphdb.{HyperGraph, HGHandle, HGPlainLink} | |
object HGDBRecursiveTextTest { |
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 hgtest.storage | |
import org.hypergraphdb._ | |
import collection.JavaConversions._ | |
import org.hypergraphdb.HGQuery.hg | |
import org.hypergraphdb.query.AtomTypeCondition | |
import org.hypergraphdb.util.HGUtils | |
import storage.bje.BJEStorageImplementation | |
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
object HGHandleHacks { | |
implicit def richHandle(handle: HGHandle)(implicit graph: HyperGraph) = new { | |
// DEREFERENCING | |
// dereference and type cast - may throw ClassCastException | |
def d[T](implicit graph: HyperGraph): T = | |
graph.get(handle).asInstanceOf[T] | |
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.hypergraphdb.storage; | |
import java.util.Arrays; | |
import java.io.Serializable; | |
public class BAWrapper implements Serializable{ | |
private final byte[] data; | |
public BAWrapper(byte[] data) | |
{ |
OlderNewer