All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hazelcast.jet.RestartableException Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2008-2024, Hazelcast, Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hazelcast.jet;

import com.hazelcast.jet.config.JobConfig;
import com.hazelcast.jet.core.Processor;
import com.hazelcast.jet.core.ProcessorMetaSupplier;
import com.hazelcast.jet.core.ProcessorSupplier;

import java.io.Serial;

/**
 * Exception to throw from job-executing methods to indicate a failure that can
 * be resolved by restarting the job.
 * 

* It is handled when thrown from:

    *
  • {@link Processor} methods *
  • lambda functions: key & timestamp extractors, map functions... *
  • sources/sinks *
  • {@code init()} method in {@link Processor}, {@link * ProcessorSupplier} and {@link ProcessorMetaSupplier} (but not their * {@code close()} methods) *
  • ... *
* * If this exception is caught, the job will be terminated abruptly and * restarted (if {@link JobConfig#setAutoScaling so configured}). * * @since Jet 3.0 */ public class RestartableException extends JetException { @Serial private static final long serialVersionUID = 1L; public RestartableException() { } public RestartableException(String message) { super(message); } public RestartableException(String message, Throwable cause) { super(message, cause); } public RestartableException(Throwable cause) { super(cause); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy