Package com.senseidb.indexing.activity.BaseActivityFilter

Examples of com.senseidb.indexing.activity.BaseActivityFilter.ActivityFilteredResult


        long defaultUid = event.getLong(senseiSchema.getUidField());      
        if (event.opt(SenseiSchema.EVENT_TYPE_FIELD) != null && event.optString(SenseiSchema.EVENT_TYPE_FIELD).equals(SenseiSchema.EVENT_TYPE_DELETE)) {
          activityValues.delete(defaultUid);
          return event;
        }
        ActivityFilteredResult activityFilteredResult = activityFilter.filter(event, senseiSchema, shardingStrategy, senseiCore);
        onlyActivityUpdate = onlyActivityUpdate || activityFilteredResult.getFilteredObject() == null || activityFilteredResult.getFilteredObject().length() == 0 ||SenseiSchema.EVENT_TYPE_SKIP.equals(activityFilteredResult.getFilteredObject().opt(SenseiSchema.EVENT_TYPE_FIELD));
        for (long uid : activityFilteredResult.getActivityValues().keySet()) {
          if ( activityFilteredResult.getActivityValues().get(uid) == null || activityFilteredResult.getActivityValues().get(uid).size() == 0) {
            continue;
          }
          int previousIndex = activityValues.getIndexByUID(uid);
          int index = activityValues.update(uid, version, activityFilteredResult.getActivityValues().get(uid));
          if (index >= 0 && previousIndex < 0 && (onlyActivityUpdate || defaultUid != uid)) {
            updateExistingBoboIndexes(uid, index, activityFilteredResult.getActivityValues().get(uid).keySet());
          }
        }
        return activityFilteredResult.getFilteredObject();
      } catch (JSONException ex) {
        throw new RuntimeException(ex);
      }     
    }
View Full Code Here

TOP

Related Classes of com.senseidb.indexing.activity.BaseActivityFilter.ActivityFilteredResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.