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.
/*
* Copyright 2013 eBuddy B.V.
*
* 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.ebuddy.cassandra.dao;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nonnull;
import com.ebuddy.cassandra.BatchContext;
import com.ebuddy.cassandra.dao.mapper.ColumnFamilyRowMapper;
import com.ebuddy.cassandra.dao.mapper.ColumnMapper;
/**
* Core Column Family operations.
* @author Eric Zoerner [email protected]
*/
public interface ColumnFamilyOperations {
/**
* Create a BatchContext for use with this keyspace.
*
* @return the BatchContext
*/
BatchContext begin();
/**
* Execute a batch of mutations using a mutator.
*
* @param batchContext the BatchContext
*/
void commit(@Nonnull BatchContext batchContext);
V readColumnValue(K rowKey, N columnName);
Map readColumnsAsMap(K rowKey);
Map readColumnsAsMap(K rowKey, N start, N finish, int count, boolean reversed);
List readColumns(K rowKey, ColumnMapper columnMapper);
List readColumns(K rowKey, N start, N finish, int count, boolean reversed, ColumnMapper columnMapper);
Map> multiGetAsMap(Iterable rowKeys);
Map> multiGetColumnsAsMap(Iterable rowKeys, N... columnNames);
Map> readRowsAsMap();
List multiGet(Iterable rowKeys, ColumnFamilyRowMapper rowMapper);
List multiGetColumns(Iterable rowKeys, ColumnFamilyRowMapper rowMapper, N... columnNames);
void writeColumn(K rowKey, N columnName, V columnValue);
void writeColumn(K rowKey, N columnName, V columnValue, long timeToLive, TimeUnit timeToLiveTimeUnit);
void writeColumn(K rowKey, N columnName, V columnValue, @Nonnull BatchContext batchContext);
void writeColumn(K rowKey,
N columnName,
V columnValue,
int timeToLive,
TimeUnit timeToLiveTimeUnit,
@Nonnull BatchContext batchContext);
void writeColumns(K rowKey, Map map);
void writeColumns(K rowKey, Map map, @Nonnull BatchContext batchContext);
void deleteColumns(K rowKey, N... columnNames);
void deleteColumns(K rowKey, N start, N finish);
void deleteColumns(K rowKey, N start, N finish, BatchContext batchContext);
void removeRow(K rowKey);
void removeRow(K rowKey, BatchContext batchContext);
}