Skip to content

Instantly share code, notes, and snippets.

@zeryx
Created January 22, 2016 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeryx/86bee8c03d9efe2b2c16 to your computer and use it in GitHub Desktop.
Save zeryx/86bee8c03d9efe2b2c16 to your computer and use it in GitHub Desktop.
trait ConnectionInMemory {
var graph: TitanGraph = null
def connect() = {
import org.apache.commons.configuration.BaseConfiguration
val conf = new BaseConfiguration()
conf.setProperty("storage.backend","inmemory")
import com.thinkaurelius.titan.core.TitanFactory
graph = TitanFactory.open(conf)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment