http://git-wip-us.apache.org/repos/asf/polygene-website/blob/86741dec/content/java/3.0.0/extension-es-redis.html ---------------------------------------------------------------------- diff --git a/content/java/3.0.0/extension-es-redis.html b/content/java/3.0.0/extension-es-redis.html new file mode 100644 index 0000000..18156ca --- /dev/null +++ b/content/java/3.0.0/extension-es-redis.html @@ -0,0 +1,122 @@ + +Redis EntityStore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Polygene™
Introduction
Tutorials
Javadoc
Samples
Core
Libraries
Extensions
Tools
Glossary 

Redis EntityStore

code

docs

tests

EntityStore service backed by a Redis database.

Table 60. Artifact

Group IDArtifact IDVersion

org.apache.polygene.extensions

org.apache.polygene.extension.entitystore-redis

3.0.0


Assembly

Assembly is done using the provided Assembler.

Traceback (most recent call last):
+  File "/Users/paul/.asciidoc/filters/snippet/snippet.py", line 100, in <module>
+    for line in snippet(**configuration(indata)):
+  File "/Users/paul/.asciidoc/filters/snippet/snippet.py", line 51, in snippet
+    sourceFile = open(PATH_PATTERN % locals())
+IOError: [Errno 2] No such file or directory: 'extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreTest.java'
+

Configuration

Here are the configuration properties for the Redis client:

public interface RedisEntityStoreConfiguration
+{
+
+    /**
+     * Redis host.
+     *
+     * Defaulted to 127.0.0.1.
+     */
+    @Optional
+    Property<String> host();
+
+    /**
+     * Redis port.
+     *
+     * Defaulted to 6379.
+     */
+    @Optional
+    Property<Integer> port();
+
+    /**
+     * Connection timeout in milliseconds.
+     *
+     * Defaulted to 2000.
+     */
+    @Optional
+    Property<Integer> timeout();
+
+    /**
+     * Redis password.
+     */
+    @Optional
+    Property<String> password();
+
+    /**
+     * Redis database.
+     *
+     * Defaulted to 0.
+     */
+    @Optional
+    Property<Integer> database();
+
+}
+
\ No newline at end of file http://git-wip-us.apache.org/repos/asf/polygene-website/blob/86741dec/content/java/3.0.0/extension-es-riak.html ---------------------------------------------------------------------- diff --git a/content/java/3.0.0/extension-es-riak.html b/content/java/3.0.0/extension-es-riak.html new file mode 100644 index 0000000..ef3da6b --- /dev/null +++ b/content/java/3.0.0/extension-es-riak.html @@ -0,0 +1,233 @@ + +Riak EntityStore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Polygene™
Introduction
Tutorials
Javadoc
Samples
Core
Libraries
Extensions
Tools
Glossary 

Riak EntityStore

code

docs

tests

EntityStore service backed by a Riak bucket.

The EntityStore only supports accessing Riak using protocol buffers. +HTTP is not supported since the 2.x serie of the Riak Java client. +See the Riak documentation.

Table 61. Artifact

Group IDArtifact IDVersion

org.apache.polygene.extensions

org.apache.polygene.extension.entitystore-riak

3.0.0


Assembly

Assembly is done using the provided Assembler:

Traceback (most recent call last):
+  File "/Users/paul/.asciidoc/filters/snippet/snippet.py", line 100, in <module>
+    for line in snippet(**configuration(indata)):
+  File "/Users/paul/.asciidoc/filters/snippet/snippet.py", line 51, in snippet
+    sourceFile = open(PATH_PATTERN % locals())
+IOError: [Errno 2] No such file or directory: 'extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreTest.java'
+

Configuration

Here are the available configuration properties:

public interface RiakEntityStoreConfiguration
+{
+    /**
+     * List of Riak Protocol Buffer hosts.
+     *
+     * Each entry can contain either an IP address / hostname
+     * or an IP address / hostname followed by a column and the host's port.
+     *
+     * Defaulted to 127.0.0.1 if empty.
+     *
+     * @return List of Riak nodes
+     */
+    @UseDefaults
+    Property<List<String>> hosts();
+
+    /**
+     * User name to use for authentication.
+     *
+     * @return Authentication user name
+     */
+    @Optional
+    Property<String> username();
+
+    /**
+     * Password to use for authentication.
+     *
+     * @return Authentication password
+     */
+    @Optional
+    Property<String> password();
+
+    /**
+     * Type of the keystore used for server certificate authentication.
+     *
+     * @return Type of the keystore used for server certificate authentication
+     */
+    @Optional
+    @OneOf( { "PKCS12", "JCEKS", "JKS" } )
+    Property<String> truststoreType();
+
+    /**
+     * Path of the keystore used for server certificate authentication.
+     *
+     * @return Path of the keystore used for server certificate authentication
+     */
+    @Optional
+    Property<String> truststorePath();
+
+    /**
+     * Password of the keystore used for server certificate authentication.
+     *
+     * @return Password of the keystore used for server certificate authentication
+     */
+    @Optional
+    Property<String> truststorePassword();
+
+    /**
+     * Type of the keystore used for client certificate authentication.
+     *
+     * @return Type of the keystore used for client certificate authentication
+     */
+    @Optional
+    @OneOf( { "PKCS12", "JCEKS", "JKS" } )
+    Property<String> keystoreType();
+
+    /**
+     * Path of the keystore used for client certificate authentication.
+     *
+     * @return Path of the keystore used for client certificate authentication
+     */
+    @Optional
+    Property<String> keystorePath();
+
+    /**
+     * Password of the keystore used for client certificate authentication.
+     *
+     * @return Password of the keystore used for client certificate authentication
+     */
+    @Optional
+    Property<String> keystorePassword();
+
+    /**
+     * Password of the key used for client certificate authentication.
+     *
+     * @return Password of the key used for client certificate authentication
+     */
+    @Optional
+    Property<String> keyPassword();
+
+    /**
+     * Riak Bucket where Entities state will be stored.
+     *
+     * Defaulted to "polygene:entities".
+     *
+     * @return Riak bucket name
+     */
+    @UseDefaults( "polygene:entities" )
+    Property<String> bucket();
+
+    /**
+     * Cluster execution attempts.
+     *
+     * @return Cluster execution attempts
+     */
+    @Optional
+    Property<Integer> clusterExecutionAttempts();
+
+    /**
+     * Minimum connections per node.
+     *
+     * @return Minimum connections per node
+     */
+    @Optional
+    Property<Integer> minConnections();
+
+    /**
+     * Maximum connections per node.
+     *
+     * @return Maximum connections per node
+     */
+    @Optional
+    Property<Integer> maxConnections();
+
+    /**
+     * Block on maximum connections.
+     *
+     * @return Block on maximum connections
+     */
+    @UseDefaults
+    Property<Boolean> blockOnMaxConnections();
+
+    /**
+     * Connection timeout.
+     *
+     * @return Connection timeout
+     */
+    @Optional
+    Property<Integer> connectionTimeout();
+
+    /**
+     * Idle timeout.
+     *
+     * @return idle timeout
+     */
+    @Optional
+    Property<Integer> idleTimeout();
+}
+

All authentication related properties are optional. +By default no authentication is used. +As soon as you provide a username, authentication is set up. +Please note that you should then at least provide truststoreType, truststorePath and truststorePassword. +To use client certificate authentication, set keystoreType, keystorePath, keystorePassword and keyPassword.

\ No newline at end of file http://git-wip-us.apache.org/repos/asf/polygene-website/blob/86741dec/content/java/3.0.0/extension-es-sqlkv.html ---------------------------------------------------------------------- diff --git a/content/java/3.0.0/extension-es-sqlkv.html b/content/java/3.0.0/extension-es-sqlkv.html new file mode 100644 index 0000000..82275c4 --- /dev/null +++ b/content/java/3.0.0/extension-es-sqlkv.html @@ -0,0 +1,347 @@ + +SQL Key/Value EntityStore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Polygene™
Introduction
Tutorials
Javadoc
Samples
Core
Libraries
Extensions
Tools
Glossary 

SQL Key/Value EntityStore

code

docs

tests

EntityStore service backed by a SQL database with a simple sch ema where entities are stored in a key/value fashion.

This extension fully leverage the SQL Library meaning that you must use it to assemble your DataSource and that you +get Circuit Breaker and JMX integration for free.

The database schema is managed using ???.

The following SQL databases are supported:

Each entity state is stored as a single row so maximum number of entities is the maximum number of rows per table +supported by the underlying SQL database.

Table 62. Artifact

Group IDArtifact IDVersion

org.apache.polygene.extensions

org.apache.polygene.extension.entitystore-sqlkv

3.0.0


Configuration

Here are the available configuration properties:

Traceback 
 (most recent call last):
+  File "/Users/paul/.asciidoc/filters/snippet/snippet.py", line 100, in <module>
+    for line in snippet(**configuration(indata)):
+  File "/Users/paul/.asciidoc/filters/snippet/snippet.py", line 51, in snippet
+    sourceFile = open(PATH_PATTERN % locals())
+IOError: [Errno 2] No such file or directory: 'extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreConfiguration.java'
+

The assembly snippets below show the DataSource assembly alongside the SQL EntityStore assembly. Remember to configure +the DataSource properly, see SQL Library and Configure a Service.

PostgreSQL

Maximum number of entities is unlimited.

Assembly is done using the provided Assembler:

public void assemble( ModuleAssembly module )
+    throws AssemblyException
+{
+  [...snip...]
+
+    // DataSourceService
+    new DBCPDataSourceServiceAssembler()
+        .identifiedBy( "postgresql-datasource-service" )
+        .visibleIn( Visibility.module )
+        .withConfig( config, Visibility.layer )
+        .assemble( module );
+
+    // DataSource
+    new DataSourceAssembler()
+        .withDataSourceServiceIdentity( "postgresql-datasource-service" )
+        .identifiedBy( "postgresql-datasource" )
+        .visibleIn( Visibility.module )
+        .withCircuitBreaker()
+        .assemble( module );
+
+    // SQL EntityStore
+    new PostgreSQLEntityStoreAssembler()
+        .visibleIn( Visibility.application )
+        .withConfig( config, Visibility.layer )
+        .assemble( module );
+          [...snip...]
+
+}
+

Sample DataSource configuration defaults:

#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+
+enabled=true
+driver=org.postgresql.Driver
+username=jdbc_test_login
+password=password

MySQL and MariaDB

Maximum number of entities depends on the choosen storage engine.

Assembly is done using the provided Assembler:

public void assemble( ModuleAssembly module )
+    throws AssemblyException
+{
+  [...snip...]
+
+    // DataSourceService
+    new DBCPDataSourceServiceAssembler()
+        .identifiedBy( "mysql-datasource-service" )
+        .visibleIn( Visibility.module )
+        .withConfig( config, Visibility.layer )
+        .assemble( module );
+
+    // DataSource
+    new DataSourceAssembler()
+        .withDataSourceServiceIdentity( "mysql-datasource-service" )
+        .identifiedBy( "mysql-datasource" )
+        .visibleIn( Visibility.module )
+        .withCircuitBreaker()
+        .assemble( module );
+
+    // SQL EntityStore
+    new MySQLEntityStoreAssembler()
+        .visibleIn( Visibility.application )
+        .withConfig( config, Visibility.layer )
+        .assemble( module );
+          [...snip...]
+
+}
+

Sample DataSource configuration defaults:

#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+
+enabled=true
+#url=jdbc:mysql://localhost:3306/jdbc_test_db?profileSQL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&nullCatalogMeansCurrent=true&nullNamePatternMatchesAll=true
+driver=com.mysql.cj.jdbc.Driver
+username=root
+password=

SQLite

Maximum number of entities is unlimited.

The Xerial SQLite JDBC driver is recommended. +It provides native support on Linux, Windows and MaxOSX, pure Java on other OSes.

Assembly is done using the provided Assembler:

public void assemble( ModuleAssembly module )
+    throws AssemblyException
+{
+  [...snip...]
+
+    // DataSourceService
+    new DBCPDataSourceServiceAssembler()
+        .identifiedBy( "sqlite-datasource-service" )
+        .visibleIn( Visibility.module )
+        .withConfig( config, Visibility.layer )
+        .assemble( module );
+
+    // DataSource
+    new DataSourceAssembler()
+        .withDataSourceServiceIdentity( "sqlite-datasource-service" )
+        .identifiedBy( "sqlite-datasource" )
+        .visibleIn( Visibility.module )
+        .withCircuitBreaker()
+        .assemble( module );
+
+    // SQL EntityStore
+    new SQLiteEntityStoreAssembler()
+        .visibleIn( Visibility.application )
+        .withConfig( config, Visibility.layer )
+        .assemble( module );
+}
+

Sample DataSource configuration defaults:

#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+
+enabled=true
+url=jdbc:sqlite::memory:
+driver=org.sqlite.JDBC
+username=
+password=

H2 Database Engine

Maximum number of entities is 2^64.

Assembly is done using the provided Assembler:

public void assemble( ModuleAssembly module )
+    throws AssemblyException
+{
+  [...snip...]
+
+    // DataSourceService
+    new DBCPDataSourceServiceAssembler()
+        .identifiedBy( "h2-datasource-service" )
+        .visibleIn( Visibility.module )
+        .withConfig( config, Visibility.layer )
+        .assemble( module );
+
+    // DataSource
+    new DataSourceAssembler()
+        .withDataSourceServiceIdentity( "h2-datasource-service" )
+        .identifiedBy( "h2-datasource" )
+        .visibleIn( Visibility.module )
+        .withCircuitBreaker()
+        .assemble( module );
+
+    // SQL EntityStore
+    new H2SQLEntityStoreAssembler()
+        .visibleIn( Visibility.application )
+        .withConfig( config, Visibility.layer )
+        .assemble( module );
+}
+

Sample DataSource configuration defaults:

#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+
+enabled=true
+url=jdbc:h2:mem:test
+driver=org.h2.Driver
+username=
+password=

Apache Derby and Oracle JavaDB

Maximum number of entities is unlimited.

Assembly is done using the provided Assembler:

public void assemble( ModuleAssembly module )
+    throws AssemblyException
+{
+  [...snip...]
+
+    // DataSourceService
+    new DBCPDataSourceServiceAssembler()
+        .identifiedBy( "derby-datasource-service" )
+        .visibleIn( Visibility.module )
+        .withConfig( config, Visibility.layer )
+        .assemble( module );
+
+    // DataSource
+    new DataSourceAssembler()
+        .withDataSourceServiceIdentity( "derby-datasource-service" )
+        .identifiedBy( "derby-datasource" )
+        .visibleIn( Visibility.module )
+        .withCircuitBreaker()
+        .assemble( module );
+
+    // SQL EntityStore
+    new DerbySQLEntityStoreAssembler()
+        .visibleIn( Visibility.application )
+        .withConfig( config, Visibility.layer )
+        .assemble( module );
+}
+

Sample DataSource configuration defaults:

#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+
+enabled=true
+url=jdbc:derby:memory:testdb;create=true
+driver=org.apache.derby.jdbc.EmbeddedDriver
+username=
+password=
\ No newline at end of file http://git-wip-us.apache.org/repos/asf/polygene-website/blob/86741dec/content/java/3.0.0/extension-index-elasticsearch.html ---------------------------------------------------------------------- diff --git a/content/java/3.0.0/extension-index-elasticsearch.html b/content/java/3.0.0/extension-index-elasticsearch.html new file mode 100644 index 0000000..e856bf9 --- /dev/null +++ b/content/java/3.0.0/extension-index-elasticsearch.html @@ -0,0 +1,149 @@ + +ElasticSearch Index/Query + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Polygene™
Introduction
Tutorials
Javadoc
Samples
Core
Libraries
Extensions
Tools
Glossary 

ElasticSearch Index/Query

code

docs

tests

Index/Query services backed by ElasticSearch search engine built on top of +Apache Lucene.

Warning

ElasticSearch Index/Query do not support ComplexQueries from the Query API, ie. queries by "example value".

Three modes of operation are supported:

In any case, Lucene hard limits apply. +See the Lucene File Format +documentation about maximum index size and document count. +Moreover, each field cannot be larger than 32766 bytes in its serialized form.

Table 65. Artifact

Group IDArtifact IDVersion

org.apache.polygene.extensions

org.apache.polygene.extension.indexing-elasticsearch

3.0.0


Embedded on local file system

Filesystem base d ElasticSearch Index/Query service relies on the FileConfig Library to decide where it stores its +index data, transaction logs etc…

Assembly is done using the provided Assembler:

new ESFilesystemIndexQueryAssembler()
+    .withConfig( configModule, configVisibility )
+    .assemble( module );
+
Configuration

Important

By default queries can only traverse Aggregated Associations, if you want to be able to traverse all +Associations set the indexNonAggregatedAssociations configuration property to TRUE.

Here are the configuration properties for the filesystem ElasticSearch Index/Query services:

Traceback (most recent call last):
+  File "/Users/paul/.asciidoc/filters/snippet/snippet.py", line 100, in <module>
+    for line in snippet(**configuration(indata)):
+  File "/Users/paul/.asciidoc/filters/snippet/snippet.py", line 51, in snippet
+    sourceFile = open(PATH_PATTERN % locals())
+IOError: [Errno 2] No such file or directory: 'extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchConfiguration.java'
+

All configuration properties are defaulted meaning that you can use ElasticSearch Index/Query service without +configuration.

In an ElasticSearch cluster

Assembly

Assembly is done using the provided Assembler:

new ESClusterIndexQueryAssembler()
+    .withConfig( configModule, configVisibility )
+    .assemble( module );
+
Configuration

Here are the configuration properties for the clustered ElasticSearch Index/Query service. Note that it inherits the +properties defined in the filesystem configuration, see above.

public interface ElasticSearchClusterConfiguration
+    extends ElasticSearchIndexingConfiguration
+{
+
+    /**
+     * Coma separated list of nodes host:port.
+     * Defaults to '127.0.0.1:9300'.
+     */
+    @Optional Property<String> nodes();
+
+    /**
+     * Allows client to sniff the rest of the cluster, and add those into its list of machines to use.
+     * In this case, note that the ip addresses used will be the ones that the other nodes were started
+     * with (the “publish” address).
+     * Defaults to FALSE.
+     */
+    @UseDefaults Property<Boolean> clusterSniff();
+
+    /**
+     * Set to true to ignore cluster name validation of connected nodes.
+     * Defaults to FALSE.
+     */
+    @UseDefaults Property<Boolean> ignoreClusterName();
+
+    /**
+     * The time to wait for a ping response from a node.
+     * Defaults to 5s.
+     */
+    @Optional Property<String> pingTimeout();
+
+    /**
+     * How often to sample / ping the nodes listed and connected.
+     * Defaults to 5s.
+     */
+    @Optional Property<String> samplerInterval();
+
+}
+

Again, all configuration properties are defaulted meaning that you can use ElasticSearch Index/Query service without +configuration.

Using a provided client

Assembly

Assembly is done using the provided Assembler:

new ESClientIndexQueryAssembler( client )
+    .withConfig( configModule, configVisibility )
+    .assemble( module );
+
Configuration

Here are the configuration properties for the ElasticSearch Index/Query service using a provided client. +Note that the clusterName is ignored as this is managed by the client.

Traceback (most recent call last):
+  File "/Users/paul/.asciidoc/filters/snippet/snippet.py", line 100, in <module>
+    for line in snippet(**configuration(indata)):
+  File "/Users/paul/.asciidoc/filters/snippet/snippet.py", line 51, in snippet
+    sourceFile = open(PATH_PATTERN % locals())
+IOError: [Errno 2] No such file or directory: 'extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchConfiguration.java'
+

Again, all configuration properties are defaulted meaning that you can use ElasticSearch Index/Query service without +configuration.

\ No newline at end of file