[ 
https://issues.apache.org/jira/browse/GORA-656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17344712#comment-17344712
 ] 

ASF GitHub Bot commented on GORA-656:
-------------------------------------

kamaci commented on a change in pull request #222:
URL: https://github.com/apache/gora/pull/222#discussion_r632661023



##########
File path: 
gora-hazelcast/src/main/java/org/apache/gora/hazelcast/store/HazelcastCacheEntryListenerFactory.java
##########
@@ -0,0 +1,58 @@
+/**
+ * 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.
+ */
+
+package org.apache.gora.hazelcast.store;
+
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.cache.configuration.Factory;
+
+/**
+ * {@link HazelcastCacheEntryListenerFactory} is the primary class
+ * responsible for creating cache entry listeners which listens on {@link 
javax.cache.event.CacheEntryEvent}
+ * cache entry events EG:- Creation, Removal, etc of keys on caches and 
trigger actions as specified.
+ */
+public class HazelcastCacheEntryListenerFactory<K, T extends PersistentBase>
+        implements Factory<HazelcastCacheEntryListener<K, T>> {
+
+  public static final long serialVersionUID = 201305101634L;
+  private static final Logger LOG = 
LoggerFactory.getLogger(HazelcastCacheEntryListenerFactory.class);
+  private transient HazelcastCacheEntryListener<K, T> instance;
+
+  public HazelcastCacheEntryListenerFactory(HazelcastCacheEntryListener<K, T> 
instance) {
+    LOG.info("Hazelcast cache entry listener factory initialized 
successfully.");
+    this.instance = instance;
+  }
+
+  public HazelcastCacheEntryListener<K, T> create() {
+    return this.instance;
+  }
+
+  public boolean equals(Object other) {
+    if (this == other) {
+      return true;
+    } else if (other != null && this.getClass() == other.getClass()) {

Review comment:
       No need for an else if you had a if with return.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Hazelcast IMap backed datastore
> -------------------------------
>
>                 Key: GORA-656
>                 URL: https://issues.apache.org/jira/browse/GORA-656
>             Project: Apache Gora
>          Issue Type: Improvement
>            Reporter: Kevin Ratnasekera
>            Priority: Major
>              Labels: gsoc2020
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Current implementation of JCache datastore is written in a way that it will 
> work with any JCache provider. Even though we have made explicitly available 
> Hazelcast JCache provider to the classpath. This implementation should be 
> based on the native interfaces of IMap.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to