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


Java ColumnFamilyResult.getColumnNames方法代码示例

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


在下文中一共展示了ColumnFamilyResult.getColumnNames方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mapRow

import me.prettyprint.cassandra.service.template.ColumnFamilyResult; //导入方法依赖的package包/类
@Override
public List<ActorSystemEventListener> mapRow(final ColumnFamilyResult<Composite, String> results) {
    List<ActorSystemEventListener> resultList = new ArrayList<>(1024);

    if(results.hasResults()) {
        Collection<String> actorIds = results.getColumnNames();
        for (String actorId : actorIds) {
            try {
                resultList.add(ActorSystemEventListenerDeserializer.get().deserialize(results.getByteArray(actorId)));
            } catch(IOException e)  {
                logger.error("IOException while deserializing ActorSystemEventListener",e);
            }
        }
    }
    return resultList;
}
 
开发者ID:elasticsoftwarefoundation,项目名称:elasticactors,代码行数:17,代码来源:CassandraActorSystemEventListenerRepository.java

示例2: mapRow

import me.prettyprint.cassandra.service.template.ColumnFamilyResult; //导入方法依赖的package包/类
@Override
public List<ScheduledMessage> mapRow(final ColumnFamilyResult<Composite, Composite> results) {
    List<ScheduledMessage> resultList = new LinkedList<>();

    if(results.hasResults()) {
        Collection<Composite> scheduledMessages = results.getColumnNames();
        for (Composite columnName : scheduledMessages) {
            try {
                resultList.add(scheduledMessageDeserializer.deserialize(results.getByteArray(columnName)));
            } catch(IOException e)  {
                logger.error(e);
            }
        }
    }
    return resultList;
}
 
开发者ID:elasticsoftwarefoundation,项目名称:elasticactors,代码行数:17,代码来源:CassandraScheduledMessageRepository.java

示例3: getMailingLists

import me.prettyprint.cassandra.service.template.ColumnFamilyResult; //导入方法依赖的package包/类
protected List<MailingList> getMailingLists( String projectVersionMetadataKey )
{
    List<MailingList> mailingLists = new ArrayList<>();

    QueryResult<OrderedRows<String, String, String>> result =
        HFactory.createRangeSlicesQuery( cassandraArchivaManager.getKeyspace(), ss, ss, ss ) //
            .setColumnFamily( cassandraArchivaManager.getMailingListFamilyName() ) //
            .setColumnNames( NAME.toString() ) //
            .setRowCount( Integer.MAX_VALUE ) //
            .addEqualsExpression( "projectVersionMetadataModel.key", projectVersionMetadataKey ) //
            .execute();
    for ( Row<String, String, String> row : result.get() )
    {
        ColumnFamilyResult<String, String> columnFamilyResult =
            this.mailingListTemplate.queryColumns( row.getKey() );

        MailingList mailingList = new MailingList();
        mailingList.setName( columnFamilyResult.getString( NAME.toString() ) );
        mailingList.setMainArchiveUrl( columnFamilyResult.getString( "mainArchiveUrl" ) );
        mailingList.setPostAddress( columnFamilyResult.getString( "postAddress" ) );
        mailingList.setSubscribeAddress( columnFamilyResult.getString( "subscribeAddress" ) );
        mailingList.setUnsubscribeAddress( columnFamilyResult.getString( "unsubscribeAddress" ) );

        List<String> otherArchives = new ArrayList<>();

        for ( String columnName : columnFamilyResult.getColumnNames() )
        {
            if ( StringUtils.startsWith( columnName, "otherArchive." ) )
            {
                otherArchives.add( columnFamilyResult.getString( columnName ) );
            }
        }

        mailingList.setOtherArchives( otherArchives );
        mailingLists.add( mailingList );
    }

    return mailingLists;
}
 
开发者ID:ruikom,项目名称:apache-archiva,代码行数:40,代码来源:CassandraMetadataRepository.java


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