@Override public void queueEntityIndexUpdate( final ApplicationScope applicationScope, final Entity entity, long updatedAfter) { offer( new EntityIndexEvent( queueFig.getPrimaryRegion(), new EntityIdScope(applicationScope, entity.getId()), 0)); final EntityIndexOperation entityIndexOperation = new EntityIndexOperation(applicationScope, entity.getId(), updatedAfter); final IndexOperationMessage indexMessage = eventBuilder.buildEntityIndex(entityIndexOperation).toBlocking().lastOrDefault(null); queueIndexOperationMessage(indexMessage); }
@Override public void queueNewEdge( final ApplicationScope applicationScope, final Entity entity, final Edge newEdge) { offer( new EdgeIndexEvent(queueFig.getPrimaryRegion(), applicationScope, entity.getId(), newEdge)); }
/** Create the index doc from the given entity */ public static String createIndexDocId( final ApplicationScope applicationScope, final Entity entity, final IndexEdge indexEdge) { return createIndexDocId(applicationScope, entity.getId(), entity.getVersion(), indexEdge); }
@Override public void call(final Entity entity) { entityCache.put(entity.getId(), entity); }