[
https://issues.apache.org/jira/browse/IGNITE-7421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16398244#comment-16398244
]
Vladimir Ozerov commented on IGNITE-7421:
-----------------------------------------
Last piece on public API:
1) {{SslProtocol}} - why do we need so many modes? General rule of thumb here -
start from simple, then add more modes as needed. SSL is considered deprecated,
I do not see why we need it in the first place.
2) {{ClientCacheConfiguration.qryEntities}} and {{keyCfg}} - I would avoid
converting it to the list and back, this adds no value and exposes risk of NPE
(e.g. if user is to call {{setQueryEntity(null)}}, he may receive an exception.
This might be especially severe in frameworks like Spring.
3) {{ClientConfiguration.setAddresses}} - there should be no validation in
config classes. This is just a container of properties. We should validate it
only during client start. Also it is better to set {{addrs}} to {{null}}.
4) {{ClientConfiguration.tcpNoDelay}} - should be {{setTcpNoDelay}}.
5) {{SslProtocol}}, {{ClientCacheConfiguration}}, {{ClientConfiguration}} -
here is no need to implement {{equals}} and {{hashCode}}. Normally we do not do
this for configurations because some configuration objects might be stateful
and we never use them in set structures. Boilerplate is another reason.
> Thin client Java API - data grid API
> ------------------------------------
>
> Key: IGNITE-7421
> URL: https://issues.apache.org/jira/browse/IGNITE-7421
> Project: Ignite
> Issue Type: New Feature
> Components: thin client
> Reporter: Alexey Kukushkin
> Assignee: Alexey Kukushkin
> Priority: Major
> Labels: data, java, thin
>
> Implement below Java bindings for the thin client protocol. The client
> configuration must support failover and encryption.
> Cache
> JCache (limited)
> getName(): String
> put(key, val)
> get(key): V
> getAll(keys: Set): Map
> containsKey(key): boolean
> getAndPut(key, val): V
> getAndReplace(key, val): V
> getAndRemove(key): V
> putIfAbsent
> replace(key, val)
> replace(key, oldVal, newVal)
> putAll
> clear
> remove(key)
> remove(key, val)
> removeAll()
> removeAll(keys: Set)
> getConfiguration(clazz): Configuration
> close()
> size(modes: CachePeekMode...)
> query(qry: Query): QueryCursor
> query(qry: SqlFieldsQuery): FieldsQueryCursor<List>
> withKeepBinary(): IgniteCache
> Ignite
> cache(name: String)
> cacheNames(): Collection
> binary(): IgniteBinary
> createCache(name): Cache
> getOrCreateCache(name): Cache
> destroyCache(name)
> Ignition
> startClient(:ClientConfiguration): Ignite
> ClientConfiguration(port, host, binaryConfiguration, sslConfiguration,
> etc...)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)