コード例 #1
0
 public StoreWorker(MapContainer mapContainer, WriteBehindProcessor writeBehindProcessor) {
   this.mapName = mapContainer.getName();
   this.mapServiceContext = mapContainer.getMapServiceContext();
   this.writeBehindProcessor = writeBehindProcessor;
   this.backupRunIntervalTime = getReplicaWaitTime();
   this.lastRunTime = Clock.currentTimeMillis();
 }
コード例 #2
0
 public void addMapIndex(MapContainer mapContainer) {
   final Indexes indexes = mapContainer.getIndexes();
   if (indexes.hasIndex()) {
     MapIndexInfo mapIndexInfo = new MapIndexInfo(mapContainer.getName());
     for (Index index : indexes.getIndexes()) {
       mapIndexInfo.addIndexInfo(index.getAttributeName(), index.isOrdered());
     }
     indexInfoList.add(mapIndexInfo);
   }
 }
コード例 #3
0
 public void addMapInterceptors(MapContainer mapContainer) {
   InterceptorRegistry interceptorRegistry = mapContainer.getInterceptorRegistry();
   List<MapInterceptor> interceptorList = interceptorRegistry.getInterceptors();
   Map<String, MapInterceptor> interceptorMap = interceptorRegistry.getId2InterceptorMap();
   Map<MapInterceptor, String> revMap = new HashMap<MapInterceptor, String>();
   for (Map.Entry<String, MapInterceptor> entry : interceptorMap.entrySet()) {
     revMap.put(entry.getValue(), entry.getKey());
   }
   InterceptorInfo interceptorInfo = new InterceptorInfo(mapContainer.getName());
   for (MapInterceptor interceptor : interceptorList) {
     interceptorInfo.addInterceptor(revMap.get(interceptor), interceptor);
   }
   interceptorInfoList.add(interceptorInfo);
 }