001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018 package org.apache.commons.pipeline.driver; 019 020 /** 021 * Stores the failure tolerance flag for a worker thread. If faultTolerance 022 * is set to CHECKED, {@link org.apache.commons.pipeline.StageException StageException}s thrown by 023 * the {@link org.apache.commons.pipeline.Stage#process(Object)} method will not interrupt queue 024 * processing, but will simply be logged with a severity of ERROR. 025 * If faultTolerance is set to ALL, runtime exceptions will also be 026 * logged and otherwise ignored. 027 * 028 * 029 */ 030 public enum FaultTolerance { 031 /** 032 * {@link org.apache.commons.pipeline.StageException StageException}s thrown by 033 * the {@link org.apache.commons.pipeline.Stage#process(Object)} method will interrupt queue 034 * processing and will be logged with a severity of ERROR. 035 */ 036 NONE, 037 /** 038 * {@link org.apache.commons.pipeline.StageException StageException}s thrown by 039 * the {@link org.apache.commons.pipeline.Stage#process(Object)} method will not interrupt queue 040 * processing, but will simply be logged with a severity of ERROR. 041 */ 042 CHECKED, 043 /** 044 * If faultTolerance is set to ALL, runtime exceptions will be 045 * logged and otherwise ignored. 046 */ 047 ALL; 048 }