Update license date and text
[aai/champ.git] / src / main / java / org / onap / aai / champ / event / AbstractLoggingChampGraph.java
index 22ac7b8..16fc00b 100644 (file)
@@ -2,8 +2,8 @@
  * ============LICENSE_START==========================================
  * org.onap.aai
  * ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017 Amdocs
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
  * ===================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END============================================
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
 package org.onap.aai.champ.event;
 
@@ -83,9 +82,11 @@ public abstract class AbstractLoggingChampGraph implements ChampGraph {
   public abstract void                             executeStoreObjectIndex(ChampObjectIndex index);
   @Override
   public abstract Optional<ChampObjectIndex>       retrieveObjectIndex(String indexName);
+  @Override
   public abstract Stream<ChampObjectIndex>         retrieveObjectIndices();
   public abstract void                             executeDeleteObjectIndex(String indexName) throws ChampIndexNotExistsException;
   public abstract void                             executeStoreRelationshipIndex(ChampRelationshipIndex index);
+  @Override
   public abstract Optional<ChampRelationshipIndex> retrieveRelationshipIndex(String indexName);
   public abstract Stream<ChampRelationshipIndex>   retrieveRelationshipIndices();
   public abstract void                             executeDeleteRelationshipIndex(String indexName) throws ChampIndexNotExistsException;
@@ -103,19 +104,19 @@ public abstract class AbstractLoggingChampGraph implements ChampGraph {
   
   /** Configuration property for setting the number of events that we will try to 'batch' 
    *  up before sending them to the event bus. */
-  public final static String  PARAM_EVENT_STREAM_BATCH_SIZE = "champ.event.stream.batch-size";
-  public final static Integer DEFAULT_EVENT_STREAM_BATCH_SIZE = 1;
+  public static final String  PARAM_EVENT_STREAM_BATCH_SIZE = "champ.event.stream.batch-size";
+  public static final Integer DEFAULT_EVENT_STREAM_BATCH_SIZE = 1;
   
   /** Configuration property for setting the maximum amount of time to wait for a batch of
    *  outgoing messages to fill up before sending the batch. */
-  public final static String  PARAM_EVENT_STREAM_BATCH_TIMEOUT = "champ.event.stream.batch-timeout";
-  public final static Integer DEFAULT_EVENT_STREAM_BATCH_TIMEOUT_MS = 500; 
+  public static final String  PARAM_EVENT_STREAM_BATCH_TIMEOUT = "champ.event.stream.batch-timeout";
+  public static final Integer DEFAULT_EVENT_STREAM_BATCH_TIMEOUT_MS = 500; 
   
-  public final static String  PARAM_EVENT_STREAM_PUBLISHER_POOL_SIZE = "champ.event.stream.publisher-pool-size";
-  public final static Integer DEFAULT_EVENT_STREAM_PUBLISHER_POOL_SIZE = 100;
+  public static final String  PARAM_EVENT_STREAM_PUBLISHER_POOL_SIZE = "champ.event.stream.publisher-pool-size";
+  public static final Integer DEFAULT_EVENT_STREAM_PUBLISHER_POOL_SIZE = 100;
   
   /** The event stream topic that we will publish Champ events to. */
-  public final static String EVENT_TOPIC = "champRawEvents";
+  public static final String EVENT_TOPIC = "champRawEvents";
     
   /** Number of events to 'batch up' before actually publishing them to the event bus. */
   private Integer eventStreamBatchSize;
@@ -268,7 +269,7 @@ public abstract class AbstractLoggingChampGraph implements ChampGraph {
       objectToDelete = retrieveObject(key);
       
     } catch (ChampUnmarshallingException e) {
-      logger.error("Unable to generate delete object log: " + e.getMessage());
+      logger.error("Unable to generate delete object log: " + e.getMessage(),e);
     }
     
     executeDeleteObject(key);
@@ -437,10 +438,10 @@ public abstract class AbstractLoggingChampGraph implements ChampGraph {
       publisherPool.execute(new EventPublisher(anEvent));
     
     } catch (RejectedExecutionException re) {
-      logger.error("Event could not be published to the event bus due to: " + re.getMessage());
+      logger.error("Event could not be published to the event bus due to: " + re.getMessage(),re);
       
     } catch (NullPointerException npe) {
-      logger.error("Can not publish null event to event bus.");
+      logger.error("Can not publish null event to event bus." + npe.getMessage(),npe);
     }
   }