Dropwizard TinkerPop

A Dropwizard library to connect to Apache TinkerPop enabled graph servers

Лицензия

Лицензия

Категории

Категории

DropWizard Контейнер Микросервисы
Группа

Группа

com.experoinc
Идентификатор

Идентификатор

dropwizard-tinkerpop
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Dropwizard TinkerPop
A Dropwizard library to connect to Apache TinkerPop enabled graph servers
Ссылка на сайт

Ссылка на сайт

https://github.com/experoinc/dropwizard-tinkerpop
Система контроля версий

Система контроля версий

https://github.com/experoinc/dropwizard-tinkerpop

Скачать dropwizard-tinkerpop

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.experoinc/dropwizard-tinkerpop/ -->
<dependency>
    <groupId>com.experoinc</groupId>
    <artifactId>dropwizard-tinkerpop</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.experoinc/dropwizard-tinkerpop/
implementation 'com.experoinc:dropwizard-tinkerpop:1.0.1'
// https://jarcasting.com/artifacts/com.experoinc/dropwizard-tinkerpop/
implementation ("com.experoinc:dropwizard-tinkerpop:1.0.1")
'com.experoinc:dropwizard-tinkerpop:jar:1.0.1'
<dependency org="com.experoinc" name="dropwizard-tinkerpop" rev="1.0.1">
  <artifact name="dropwizard-tinkerpop" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.experoinc', module='dropwizard-tinkerpop', version='1.0.1')
)
libraryDependencies += "com.experoinc" % "dropwizard-tinkerpop" % "1.0.1"
[com.experoinc/dropwizard-tinkerpop "1.0.1"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.apache.tinkerpop : gremlin-driver jar 3.2.6
io.dropwizard : dropwizard-core jar 1.0.0
org.slf4j : slf4j-api jar 1.7.25

test (2)

Идентификатор библиотеки Тип Версия
io.dropwizard : dropwizard-testing jar 1.0.0
org.apache.tinkerpop : tinkergraph-gremlin jar 3.2.6

Модули Проекта

Данный проект не имеет модулей.

dropwizard-tinkerpop

Build Status

A Dropwizard library that enables connectivity to Apache TinkerPop enabled gremlin servers.

See this blog post for a simple getting started guide.

Components

  • Configuration
  • Health Check
  • Managed Cluster

Configuration

The configuration class includes all of the parameters required to configure a remote connection to a TinkerPop server. The default values correspond to all of the defaults specified in the TinkerPop cluster builder.

Health Check

A health check is setup using the dropwizard health check registry. It executes the validationQuery specified in the configuration. It will succeed if the query responds within the validationQueryTimeout specified.

Managed Connection

The Cluster built from the TinkerPopFactory is included in dropwizard's managed lifecycle. This will allow dropwizard to try and gracefully shut down the TinkerPop client connections on shutdown.

Usage

Include the dropwizard-tinkerpop library as a dependency

<dependency>
  <groupId>com.experoinc</groupId>
  <artifactId>dropwizard-tinkerpop</artifactId>
  <version>${dropwizard-tinkerpop.version}</version>
</dependency>

Include a TinkerPopFactory instance in your application config

public class AppConfig extends Configuration {

    @Valid
    @NotNull
    private TinkerPopFactory tinkerPopFactory = new TinkerPopFactory();

    @JsonProperty("tinkerPop")
    public TinkerPopFactory getTinkerPopFactory() {
        return tinkerPopFactory;
    }

    @JsonProperty("tinkerPop")
    public void setTinkerPopFactory(TinkerPopFactory tinkerPopFactory) {
        this.tinkerPopFactory = tinkerPopFactory;
    }
}

Build the TinkerPop cluster in your applications run(AppConfig ac, Environment environment) method.

public class App extends Application<AppConfig> {
    
    @Override
    public void run(AppConfig configuration, Environment environment) throws Exception {
        Cluster cluster = configuration.getTinkerPopFactory().build(environment);
    }
}

Testing

Docker Compose is required for testing. Running docker-compose up -d will start two Gremlin server containers, one for SSL and one for non-SSL testing. You can run docker-compose down to stop and remove the containers. Tests are run by running mvn clean install.

com.experoinc

Версии библиотеки

Версия
1.0.1
1.0.0