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

org.apache.tinkerpop.gremlin.process.remote.traversal.AbstractRemoteTraversalSideEffects Maven / Gradle / Ivy

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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 org.apache.tinkerpop.gremlin.process.remote.traversal;

import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
import org.apache.tinkerpop.gremlin.structure.util.StringFactory;

import java.util.Optional;
import java.util.function.BinaryOperator;
import java.util.function.Supplier;
import java.util.function.UnaryOperator;

/**
 * @author Stephen Mallette (http://stephen.genoprime.com)
 */
public abstract class AbstractRemoteTraversalSideEffects implements RemoteTraversalSideEffects {

    @Override
    public void set(final String key, final Object value) throws IllegalArgumentException {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public void remove(final String key) {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public  void register(final String key, final Supplier initialValue, BinaryOperator reducer) {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public  void registerIfAbsent(final String key, final Supplier initialValue, BinaryOperator reducer) {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public  BinaryOperator getReducer(final String key) throws IllegalArgumentException {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public  Supplier getSupplier(final String key) throws IllegalArgumentException {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public void add(final String key, final Object value) throws IllegalArgumentException {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public  void setSack(final Supplier initialValue, UnaryOperator splitOperator, final BinaryOperator mergeOperator) {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public  Supplier getSackInitialValue() {
        return null;
        // throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public  UnaryOperator getSackSplitter() {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public  BinaryOperator getSackMerger() {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public TraversalSideEffects clone() {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }

    @Override
    public void mergeInto(final TraversalSideEffects sideEffects) {
        throw new UnsupportedOperationException("Remote traversals do not support this method");
    }
}