Sets the number of items already processed at a time being.

@param processed the number of items already processed at a time being
@param logger Logger to report to
@throws IllegalArgumentException if an invalid value was passed.
549374
public void setProcessed(int processed, Logging logger) throws IllegalArgumentException {
    setProcessed(processed);
    if(testLoggingRate(processed)) {
      logger.progress(this);
    }
  }
985789
@Override
	public void process() {
		processed = true;
		for (int i = 0; i < histogram.length; i++) {
			histogram[i] /= total;
		}
	}
767352
public function setLogger(LoggerInterface $logger) : void
    {
        if ($this instanceof Wrapper) {
            $estimator = $this->base();
            
            if ($estimator instanceof Verbose) {
                $estimator->setLogger($logger);
            }
        }

        $this->logger = $logger;
    }
730949
@Override
	protected void save(List<Counter> counters) {
		if (_logger == null)
			return;
		if (counters.size() == 0)
			return;

		Collections.sort(counters, (c1, c2) -> c1.getName().compareTo(c2.getName()));

		for (Counter counter : counters) {
			_logger.info("counters", counterToString(counter));
		}
	}
325909
private static void appendThrown(StringBuilder message, LogRecord event)
    {
        final Throwable thrown = event.getThrown();
        if (thrown != null)
        {
            final StringWriter sw = new StringWriter();
            thrown.printStackTrace(new PrintWriter(sw));
            message.append(sw);
        }
    }
449768
public void setProcessing( VideoProcessing processing ) {
		if( this.processing != null ) {
			// kill the old process
			this.processing.stopProcessing();
		}

		if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
			throw new RuntimeException("Not called from a GUI thread. Bad stuff could happen");
		}

		this.processing = processing;
		// if the camera is null then it will be initialized when the camera is initialized
		if( processing != null && mCamera != null ) {
			processing.init(mDraw,mCamera,mCameraInfo,previewRotation);
		}
	}
576999
private void incrementHeaderCounter() {
        this.numberOfHeaders++;
        this.headerAddCount++;
        if (this.limitNumHeaders < this.numberOfHeaders) {
            String msg = "Too many headers in storage: " + this.numberOfHeaders;
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, msg);
            }
            throw new IllegalArgumentException(msg);
        }
    }
92314
public void setResult(Result result) throws IllegalArgumentException
  {
    if(null == result)
      throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_RESULT_NULL, null)); //"Result should not be null");        
    m_result = result;
  }
482837
private static <E> void validateCounter(Counter<E> counts) {
    for (Map.Entry<E, Double> entry : counts.entrySet()) {
      E item = entry.getKey();
      Double dblCount = entry.getValue();
      if (dblCount == null) {
        throw new IllegalArgumentException("ERROR: null count for item " + item + "!");
      }
      if (dblCount < 0) {
        throw new IllegalArgumentException("ERROR: negative count " + dblCount + " for item " + item + "!");
      }
    }
  }
258584
public void setNumExecutors(@Nonnegative int n) throws IOException, IllegalArgumentException {
        if (n < 0) {
            throw new IllegalArgumentException("Incorrect field \"# of executors\": " + n +". It should be a non-negative number.");
        }
        if (this.numExecutors != n) {
            this.numExecutors = n;
            updateComputerList();
            save();
        }
    }
828846
@Override public int setCount(E element, int count) {
    checkNotNull(element);
    checkNonnegative(count, "count");
    while (true) {
      AtomicInteger existingCounter = Maps.safeGet(countMap, element);
      if (existingCounter == null) {
        if (count == 0) {
          return 0;
        } else {
          existingCounter = countMap.putIfAbsent(element, new AtomicInteger(count));
          if (existingCounter == null) {
            return 0;
          }
          // existingCounter != null: fall through
        }
      }

      while (true) {
        int oldValue = existingCounter.get();
        if (oldValue == 0) {
          if (count == 0) {
            return 0;
          } else {
            AtomicInteger newCounter = new AtomicInteger(count);
            if ((countMap.putIfAbsent(element, newCounter) == null)
                || countMap.replace(element, existingCounter, newCounter)) {
              return 0;
            }
          }
          break;
        } else {
          if (existingCounter.compareAndSet(oldValue, count)) {
            if (count == 0) {
              // Just CASed to 0; remove the entry to clean up the map. If the removal fails,
              // another thread has already replaced it with a new counter, which is fine.
              countMap.remove(element, existingCounter);
            }
            return oldValue;
          }
        }
      }
    }
  }
120869
public void increment(T item, double amount) {
    counts.put(item, counts.get(item) + amount);
    totalCount += amount;
  }
1201891
public <T extends ViewHandler<R>> T processing(boolean flag) {
        lock.lock();
        try {
            setProcessing(flag);
            return (T)this;
        }
        finally {
            lock.unlock();
        }
    }
678346
private void writeCounted(final SerIterator itemIterator) throws IOException {
        output.writeArrayStart();
        while (itemIterator.hasNext()) {
            itemIterator.next();
            output.writeArrayItemStart();
            output.writeArrayStart();
            output.writeArrayItemStart();
            writeObject(itemIterator.valueType(), itemIterator.value(), itemIterator);
            output.writeArrayItemStart();
            output.writeInt(itemIterator.count());
            output.writeArrayEnd();
        }
        output.writeArrayEnd();
    }
647140
private void setResultIterator(MutableObjectIterator<BinaryRow> iterator) {
		synchronized (this.iteratorLock) {
			// set the result iterator only, if no exception has occurred
			if (this.iteratorException == null) {
				this.iterator = iterator;
				this.iteratorLock.notifyAll();
			}
		}
	}
785406
public void append(final LoggingEvent event) {
        boolean isBufferSpaceAvailable = (batcher.isSpaceAvailable() && (logSummaryMap
                .size() == 0));
        boolean isBufferPutSuccessful = false;
        LocationInfo locationInfo = null;
        // Reject it when we have a fast property as these can be expensive
        Stopwatch s = locationInfoTimer.start();
        if (CONFIGURATION.shouldSummarizeOverflow(this.originalAppenderName)) {
            if (CONFIGURATION.shouldGenerateBlitz4jLocationInfo()) {
                locationInfo = LoggingContext.getInstance()
                        .generateLocationInfo(event);
            } else if (CONFIGURATION.shouldGenerateLog4jLocationInfo()) {
                locationInfo = event.getLocationInformation();
            }
        }
        s.stop();

        if (isBufferSpaceAvailable) {
            // Save the thread local info in the event so that the
            // processing threads can have access to the thread local of the arriving event
            Stopwatch sThreadLocal = saveThreadLocalTimer.start();
            saveThreadLocalInfo(event);
            sThreadLocal.stop();
            isBufferPutSuccessful = putInBuffer(event);
        }
        // If the buffer is full, then summarize the information
        if (CONFIGURATION.shouldSummarizeOverflow(this.originalAppenderName) && (!isBufferPutSuccessful)) {
            summarizeEventCounter.increment();
            Stopwatch t = putDiscardMapTimeTracer.start();
            String loggerKey = event.getLoggerName();
            if (locationInfo != null) {
                loggerKey = locationInfo.getClassName() + "_"
                        + locationInfo.getLineNumber();
            }

            LogSummary summary = (LogSummary) logSummaryMap.get(loggerKey);
            if (summary == null) {
                // Saving the thread local info is needed only for the first
                // time
                // creation of the summary
                saveThreadLocalInfo(event);
                summary = new LogSummary(event);
                logSummaryMap.put(loggerKey, summary);
            } else {
                // The event summary is already there, just increment the
                // count
                summary.add(event);
            }
            t.stop();
        } else if (!CONFIGURATION.shouldSummarizeOverflow(this.originalAppenderName) && (!isBufferPutSuccessful)) {
            // Record the event that are not summarized and which are just
            // discarded
            discardEventCounter.increment();
        }

    }
620892
protected final void setResultIteratorException(IOException ioex) {
		synchronized (this.iteratorLock) {
			if (this.iteratorException == null) {
				this.iteratorException = ioex;
				this.iteratorLock.notifyAll();
			}
		}
	}