public class CassandraServiceUtil extends Object
| Constructor and Description |
|---|
CassandraServiceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
emptyStringForNull(String value)
This method converts a null value into an empty string.
|
static boolean |
exclude(Map<String,String> properties,
String fault,
Criteria criteria)
This method determines if the supplied details should be excluded based
on the criteria.
|
static long |
getBaseTimestamp(long startTime,
long interval,
int index)
This method calculates the base time associated with the index slot.
|
static int |
getPosition(long startTime,
long interval,
long time)
This method calculates the array position of a particular time, based on a start time
and interval.
|
static boolean |
hasExclusions(Criteria criteria)
This method identifies whether the supplied criteria has exclusions.
|
static String |
propertyEncoding(CorrelationIdentifier ci)
This method returns the encoding of the correlation identifier.
|
static String |
propertyEncoding(Criteria.PropertyCriteria pc)
This method returns the encoding of the property name and value.
|
static String |
tenant(String id)
This method returns the tenant to use in the Cassandra db.
|
static List<String> |
toTagList(List<CorrelationIdentifier> cids)
This method converts a list of correlation ids to a list of
tags.
|
static List<String> |
toTagList(Map<String,String> map)
This method converts a map of properties to a list of tags.
|
static String |
whereClause(String tenantId,
Criteria criteria)
This method builds a where clause for the supplied criteria.
|
protected static final String SEPARATOR
public static List<String> toTagList(Map<String,String> map)
map - The mappublic static List<String> toTagList(List<CorrelationIdentifier> cids)
cids - The list of correlation idspublic static String whereClause(String tenantId, Criteria criteria)
tenantId - The tenant idcriteria - The criteriapublic static String propertyEncoding(Criteria.PropertyCriteria pc)
pc - The property criteriapublic static String propertyEncoding(CorrelationIdentifier ci)
ci - The correlation identifierpublic static String tenant(String id)
id - The idpublic static String emptyStringForNull(String value)
value - The valuepublic static boolean exclude(Map<String,String> properties, String fault, Criteria criteria)
properties - The propertiesfault - The faultcriteria - The criteriapublic static boolean hasExclusions(Criteria criteria)
criteria - The criteriapublic static int getPosition(long startTime,
long interval,
long time)
startTime - interval - time - public static long getBaseTimestamp(long startTime,
long interval,
int index)
startTime - The start timeinterval - The intervalindex - The indexCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.