コード例 #1
0
 @Override
 public Set<QueryableEntry> filter(QueryContext queryContext) {
   Index index = getIndex(queryContext);
   if (index != null) {
     return index.getRecords(values);
   } else {
     return null;
   }
 }
コード例 #2
0
 public void addMapIndex(MapContainer mapContainer) {
   final IndexService indexService = mapContainer.getIndexService();
   if (indexService.hasIndex()) {
     MapIndexInfo mapIndexInfo = new MapIndexInfo(mapContainer.getName());
     for (Index index : indexService.getIndexes()) {
       mapIndexInfo.addIndexInfo(index.getAttributeName(), index.isOrdered());
     }
     indexInfoList.add(mapIndexInfo);
   }
 }
コード例 #3
0
  @Override
  public void run() throws Exception {
    Indexes indexes = mapContainer.getIndexes();
    Index index = indexes.addOrGetIndex(attributeName, ordered);

    final long now = getNow();
    final Iterator<Record> iterator = recordStore.iterator(now, false);
    SerializationService serializationService = getNodeEngine().getSerializationService();
    while (iterator.hasNext()) {
      final Record record = iterator.next();
      Data key = record.getKey();
      Object value = Records.getValueOrCachedValue(record, serializationService);
      QueryableEntry queryEntry = mapContainer.newQueryEntry(key, value);
      index.saveEntryIndex(queryEntry, null);
    }
  }
コード例 #4
0
 private void useConverter(TypeConverter converter) {
   when(mockIndex.getConverter()).thenReturn(converter);
 }