当前位置: 首页>>代码示例>>Java>>正文


Java ColumnFamilyUpdater类代码示例

本文整理汇总了Java中me.prettyprint.cassandra.service.template.ColumnFamilyUpdater的典型用法代码示例。如果您正苦于以下问题:Java ColumnFamilyUpdater类的具体用法?Java ColumnFamilyUpdater怎么用?Java ColumnFamilyUpdater使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ColumnFamilyUpdater类属于me.prettyprint.cassandra.service.template包,在下文中一共展示了ColumnFamilyUpdater类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addUpdateStringValue

import me.prettyprint.cassandra.service.template.ColumnFamilyUpdater; //导入依赖的package包/类
/**
 * null check on the value to prevent {@link java.lang.IllegalArgumentException}
 * @param updater
 * @param columnName
 * @param value
 */
public static void addUpdateStringValue(ColumnFamilyUpdater<String,String> updater, String columnName, String value )
{
    if (value == null)
    {
        return;
    }
    updater.setString( columnName, value );

}
 
开发者ID:ruikom,项目名称:apache-archiva,代码行数:16,代码来源:CassandraUtils.java

示例2: doPut

import me.prettyprint.cassandra.service.template.ColumnFamilyUpdater; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
protected void doPut(byte[] key, byte[] value) throws StorageException {
	try {
		ColumnFamilyUpdater<byte[], String> updater = template
				.createUpdater(key);
		updater.setByteArray(CassandraStorageSystem.COLUMN_NAME, value);
		template.update(updater);
	} catch (HectorException e) {
		handleHectorException(e);
	}
}
 
开发者ID:vimaier,项目名称:conqat,代码行数:13,代码来源:CassandraStore.java

示例3: close

import me.prettyprint.cassandra.service.template.ColumnFamilyUpdater; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void close() throws IOException {
    if (dirty) {
        ColumnFamilyUpdater<String, String> updater = template.createUpdater(getPath());
        updater.setByteArray(RRD, buffer);
        template.update(updater);
    }
}
 
开发者ID:ChaosXu,项目名称:rrd4j-cassandra,代码行数:10,代码来源:CassandraBackend.java

示例4: update

import me.prettyprint.cassandra.service.template.ColumnFamilyUpdater; //导入依赖的package包/类
private void update(ColumnFamilyTemplate<String, String> template) {
    ColumnFamilyUpdater<String, String> updater = template.createUpdater("a key");
    updater.setString("domain", "www.chaosxu.com");
    updater.setLong("time", System.currentTimeMillis());

    template.update(updater);
}
 
开发者ID:ChaosXu,项目名称:rrd4j-cassandra,代码行数:8,代码来源:HectorTest.java

示例5: create

import me.prettyprint.cassandra.service.template.ColumnFamilyUpdater; //导入依赖的package包/类
@Override
public void create(ShardKey shardKey, ActorSystemEvent event, ActorSystemEventListener listener) {
    byte[] value = ActorSystemEventListenerSerializer.get().serialize(listener);
    ColumnFamilyUpdater<Composite,String> updater = columnFamilyTemplate.createUpdater(createKey(shardKey, event));
    updater.setByteArray(listener.getActorId(),value);
    columnFamilyTemplate.update(updater);
}
 
开发者ID:elasticsoftwarefoundation,项目名称:elasticactors,代码行数:8,代码来源:CassandraActorSystemEventListenerRepository.java

示例6: delete

import me.prettyprint.cassandra.service.template.ColumnFamilyUpdater; //导入依赖的package包/类
@Override
public void delete(ShardKey shardKey, ActorSystemEvent event, ActorRef listenerId) {
    ColumnFamilyUpdater<Composite, String> updater = columnFamilyTemplate.createUpdater();
    updater.addKey(createKey(shardKey, event));
    updater.deleteColumn(listenerId.getActorId());
    columnFamilyTemplate.update(updater);
}
 
开发者ID:elasticsoftwarefoundation,项目名称:elasticactors,代码行数:8,代码来源:CassandraActorSystemEventListenerRepository.java

示例7: create

import me.prettyprint.cassandra.service.template.ColumnFamilyUpdater; //导入依赖的package包/类
@Override
public void create(ShardKey shardKey, ScheduledMessage scheduledMessage) {
    final ColumnFamilyUpdater<Composite,Composite> updater = columnFamilyTemplate.createUpdater(createKey(shardKey));
    final Composite columnName = createColumnName(scheduledMessage);
    updater.setByteArray(columnName, ScheduledMessageSerializer.get().serialize(scheduledMessage));
    columnFamilyTemplate.update(updater);
}
 
开发者ID:elasticsoftwarefoundation,项目名称:elasticactors,代码行数:8,代码来源:CassandraScheduledMessageRepository.java

示例8: updateString

import me.prettyprint.cassandra.service.template.ColumnFamilyUpdater; //导入依赖的package包/类
/**
 * Updates the value of the column in the given row (identified by the key).
 *
 * @param key        - key to identify the row.
 * @param columnName - column to be updated.
 * @param value      - value to be inserted.
 */
public void updateString(K key, String columnName, String value) {

	// update the secondary index, if needed
	updateSecondaryIndexes(key, columnName, value, -1, -1);

	final ColumnFamilyTemplate<K, String> columnFamilyLocal = getColumnFamily();
	final ColumnFamilyUpdater<K, String> updater = columnFamilyLocal.createUpdater(key);
	updater.setString(columnName, value);
	columnFamilyLocal.update(updater);


}
 
开发者ID:WizeCommerce,项目名称:hecuba,代码行数:20,代码来源:HectorBasedHecubaClientManager.java

示例9: updateByteBuffer

import me.prettyprint.cassandra.service.template.ColumnFamilyUpdater; //导入依赖的package包/类
/**
 * Updates the value of the column in the given row (identified by the key).
 *
 * @param key        - key to identify the row.
 * @param columnName - column to be updated.
 * @param value      - value to be inserted.
 */
public void updateByteBuffer(K key, String columnName, ByteBuffer value) {
	final ColumnFamilyTemplate<K, String> columnFamilyLocal = getColumnFamily();
	final ColumnFamilyUpdater<K, String> updater = columnFamilyLocal.createUpdater(key);
	updater.setByteBuffer(columnName, value);
	columnFamilyLocal.update(updater);
}
 
开发者ID:WizeCommerce,项目名称:hecuba,代码行数:14,代码来源:HectorBasedHecubaClientManager.java


注:本文中的me.prettyprint.cassandra.service.template.ColumnFamilyUpdater类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。