Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* (c) Copyright 2018 Palantir Technologies 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.palantir.atlasdb.keyvalue.dbkvs.impl.oracle;
import com.google.common.base.Joiner;
import com.google.common.base.Throwables;
import com.google.common.collect.Lists;
import com.google.common.collect.Ordering;
import com.palantir.atlasdb.AtlasDbConstants;
import com.palantir.atlasdb.keyvalue.api.Cell;
import com.palantir.atlasdb.keyvalue.api.KeyAlreadyExistsException;
import com.palantir.atlasdb.keyvalue.api.RangeRequest;
import com.palantir.atlasdb.keyvalue.api.TableReference;
import com.palantir.atlasdb.keyvalue.api.TimestampRangeDelete;
import com.palantir.atlasdb.keyvalue.api.Value;
import com.palantir.atlasdb.keyvalue.dbkvs.OracleDdlConfig;
import com.palantir.atlasdb.keyvalue.dbkvs.OracleTableNameGetter;
import com.palantir.atlasdb.keyvalue.dbkvs.impl.ConnectionSupplier;
import com.palantir.atlasdb.keyvalue.dbkvs.impl.DbWriteTable;
import com.palantir.atlasdb.keyvalue.dbkvs.impl.OraclePrefixedTableNames;
import com.palantir.atlasdb.keyvalue.dbkvs.impl.OverflowMigrationState;
import com.palantir.atlasdb.keyvalue.dbkvs.impl.UpdateExecutor;
import com.palantir.atlasdb.keyvalue.dbkvs.impl.WhereClauses;
import com.palantir.common.exception.TableMappingNotFoundException;
import com.palantir.exception.PalantirSqlException;
import com.palantir.logsafe.SafeArg;
import com.palantir.logsafe.UnsafeArg;
import com.palantir.logsafe.logger.SafeLogger;
import com.palantir.logsafe.logger.SafeLoggerFactory;
import com.palantir.nexus.db.sql.ExceptionCheck;
import com.palantir.nexus.db.sql.SqlConnection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
public final class OracleOverflowWriteTable implements DbWriteTable {
private static final SafeLogger log = SafeLoggerFactory.get(OracleOverflowWriteTable.class);
private final OracleDdlConfig config;
private final ConnectionSupplier conns;
private final OverflowSequenceSupplier overflowSequenceSupplier;
private final OracleTableNameGetter oracleTableNameGetter;
private final OraclePrefixedTableNames oraclePrefixedTableNames;
private final TableReference tableRef;
private OracleOverflowWriteTable(
OracleDdlConfig config,
ConnectionSupplier conns,
OverflowSequenceSupplier sequenceSupplier,
OracleTableNameGetter oracleTableNameGetter,
OraclePrefixedTableNames oraclePrefixedTableNames,
TableReference tableRef) {
this.config = config;
this.conns = conns;
this.overflowSequenceSupplier = sequenceSupplier;
this.oracleTableNameGetter = oracleTableNameGetter;
this.oraclePrefixedTableNames = oraclePrefixedTableNames;
this.tableRef = tableRef;
}
public static OracleOverflowWriteTable create(
OracleDdlConfig config,
ConnectionSupplier conns,
OracleTableNameGetter oracleTableNameGetter,
OraclePrefixedTableNames oraclePrefixedTableNames,
TableReference tableRef) {
OverflowSequenceSupplier sequenceSupplier = OverflowSequenceSupplier.create(conns, config.tablePrefix());
return new OracleOverflowWriteTable(
config, conns, sequenceSupplier, oracleTableNameGetter, oraclePrefixedTableNames, tableRef);
}
@Override
public void put(Collection> data, long ts) {
List