C# Class BB.Caching.Redis.Analytics.BitwiseAnalytics

Methods for performing bitwise analytics.

Note: bitwise operations use byte-sized chunks, so setting the first bit to a value will allocate a full byte worth of data.

Check out the following links: http://blog.getspool.com/2011/11/29/fast-easy-realtime-metrics-using-redis-bitmaps http://amix.dk/blog/post/19714
Datei anzeigen Open project: JesseBuesking/BB.Caching

Public Methods

Method Description
BitwiseAnd ( IDatabase database, RedisKey destination, RedisKey keys ) : long

Perform a bitwise AND operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseAnd ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expire ) : long

Perform a bitwise AND operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseAndAsync ( IDatabase database, RedisKey destination, RedisKey keys ) : Task

Perform a bitwise AND operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseAndAsync ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expire ) : Task

Perform a bitwise AND operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseNot ( IDatabase database, RedisKey destination, RedisKey key ) : long

Perform a bitwise NOT operation on a key (containing a string value) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseNot ( IDatabase database, RedisKey destination, RedisKey key, System.TimeSpan expires ) : long

Perform a bitwise NOT operation on a key (containing a string value) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseNotAsync ( IDatabase database, RedisKey destination, RedisKey key ) : Task

Perform a bitwise NOT operation on a key (containing a string value) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseNotAsync ( IDatabase database, RedisKey destination, RedisKey key, System.TimeSpan expires ) : Task

Perform a bitwise NOT operation on a key (containing a string value) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseOr ( IDatabase database, RedisKey destination, RedisKey keys ) : long

Perform a bitwise OR operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseOr ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expire ) : long

Perform a bitwise OR operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseOrAsync ( IDatabase database, RedisKey destination, RedisKey keys ) : Task

Perform a bitwise OR operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseOrAsync ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expire ) : Task

Perform a bitwise OR operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseXOr ( IDatabase database, RedisKey destination, RedisKey keys ) : long

Perform a bitwise XOR operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseXOr ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expires ) : long

Perform a bitwise XOR operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseXOrAsync ( IDatabase database, RedisKey destination, RedisKey keys ) : Task

Perform a bitwise XOR operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

BitwiseXOrAsync ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expires ) : Task

Perform a bitwise XOR operation between multiple keys (containing string values) and store the result in the destination key.

http://redis.io/commands/bitop

Count ( IDatabase database, RedisKey key, long eventId = -1 ) : long

Gets the count of active bits at the key supplied.

Count ( RedisKey key, long eventId = -1 ) : long

Gets the count of active bits at the key supplied.

CountAsync ( IDatabase database, RedisKey key, long eventId = -1 ) : Task

Gets the count of active bits at the key supplied.

CountAsync ( RedisKey key, long eventId = -1 ) : Task

Gets the count of active bits at the key supplied.

Delete ( string category, string action, string dateTime ) : bool

The delete.

DeleteAsync ( string category, string action, string dateTime ) : Task

The delete.

Exists ( IDatabase database, RedisKey key ) : bool

Determines if the key exists.

Exists ( RedisKey key ) : bool

Determines if the key exists.

ExistsAsync ( IDatabase database, RedisKey key ) : Task

Determines if the key exists.

ExistsAsync ( RedisKey key ) : Task

Determines if the key exists.

GetCounts ( string category, string action, System.DateTime start, System.DateTime end, long eventId = -1, TimeInterval timeInterval = TimeInterval.FifteenMinutes, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : long>>.List

Gets counts by TimeInterval for the date range supplied.

GetCountsAsync ( string category, string action, System.DateTime start, System.DateTime end, long eventId = -1, TimeInterval timeInterval = TimeInterval.FifteenMinutes, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : long>>>.Task

Gets counts by TimeInterval for the date range supplied.

GetDay ( IDatabase database, string category, string action, System.DateTime dateTime ) : RedisKey

Gets the key for the day covered by the DateTime supplied, creating the data at the key if necessary.

GetDayAsync ( IDatabase database, string category, string action, System.DateTime dateTime ) : Task

Gets the key for the day covered by the DateTime supplied, creating the data at the key if necessary.

GetFifteenMinutes ( string category, string action, System.DateTime dateTime ) : RedisKey

Gets the key for the 15 minute interval covered by the DateTime supplied.

GetFifteenMinutesAsync ( string category, string action, System.DateTime dateTime ) : Task

Gets the key for the 15 minute interval covered by the DateTime supplied.

GetHour ( IDatabase database, string category, string action, System.DateTime dateTime ) : RedisKey

Gets the key for the hour covered by the DateTime supplied, creating the data at the key if necessary.

GetHourAsync ( IDatabase database, string category, string action, System.DateTime dateTime ) : Task

Gets the key for the hour covered by the DateTime supplied, creating the data at the key if necessary.

GetMinKeysForRange ( IDatabase database, string category, string action, System.DateTime start, System.DateTime end, TimeInterval timeInterval = TimeInterval.FifteenMinutes ) : RedisKey[]

Gets the fewest number of keys required to cover the date range supplied.

GetMinKeysForRangeAsync ( IDatabase database, string category, string action, System.DateTime start, System.DateTime end, TimeInterval timeInterval = TimeInterval.FifteenMinutes ) : Task

Gets the fewest number of keys required to cover the date range supplied.

GetMonth ( IDatabase database, string category, string action, System.DateTime dateTime ) : RedisKey

Gets the key for the month covered by the DateTime supplied, creating the data at the key if necessary.

GetMonthAsync ( IDatabase database, string category, string action, System.DateTime dateTime ) : Task

Gets the key for the month covered by the DateTime supplied, creating the data at the key if necessary.

GetQuarter ( IDatabase database, string category, string action, System.DateTime dateTime ) : RedisKey

Gets the keys for the months in the quarter covered by the DateTime supplied, creating the data at the key if necessary.

GetQuarterAsync ( IDatabase database, string category, string action, System.DateTime dateTime ) : Task

Gets the keys for the months in the quarter covered by the DateTime supplied, creating the data at the key if necessary.

GetWeek ( IDatabase database, string category, string action, System.DateTime dateTime, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : RedisKey

The get week.

GetWeekAsync ( IDatabase database, string category, string action, System.DateTime dateTime, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : Task

The get week.

HasEvent ( string category, string action, long eventId, System.DateTime start = default(DateTime), System.DateTime end = default(DateTime) ) : bool

Determines if an event occured.

HasEventAsync ( string category, string action, long eventId, System.DateTime start = default(DateTime), System.DateTime end = default(DateTime) ) : Task

Determines if an event occured.

TrackEvent ( string category, string action, long eventId, TimePrecision precision = TimePrecision.OneDay, System.DateTime now = default(DateTime) ) : void

Tracks an event.

TrackEventAsync ( string category, string action, long eventId, TimePrecision precision = TimePrecision.OneDay, System.DateTime now = default(DateTime) ) : System.Threading.Tasks.Task

Tracks an event.

Private Methods

Method Description
EventKey ( string category, string action, string dateTime ) : RedisKey

Method Details

BitwiseAnd() public static method

Perform a bitwise AND operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseAnd ( IDatabase database, RedisKey destination, RedisKey keys ) : long
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be AND'd are located. ///
return long

BitwiseAnd() public static method

Perform a bitwise AND operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseAnd ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expire ) : long
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be AND'd are located. ///
expire System.TimeSpan /// An expiration lifetime. ///
return long

BitwiseAndAsync() public static method

Perform a bitwise AND operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseAndAsync ( IDatabase database, RedisKey destination, RedisKey keys ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be AND'd are located. ///
return Task

BitwiseAndAsync() public static method

Perform a bitwise AND operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseAndAsync ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expire ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be AND'd are located. ///
expire System.TimeSpan /// An expiration lifetime. ///
return Task

BitwiseNot() public static method

Perform a bitwise NOT operation on a key (containing a string value) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseNot ( IDatabase database, RedisKey destination, RedisKey key ) : long
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
key RedisKey /// The key where the data to be NOT'd is located. ///
return long

BitwiseNot() public static method

Perform a bitwise NOT operation on a key (containing a string value) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseNot ( IDatabase database, RedisKey destination, RedisKey key, System.TimeSpan expires ) : long
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
key RedisKey /// The key where the data to be NOT'd is located. ///
expires System.TimeSpan /// An expiration lifetime. ///
return long

BitwiseNotAsync() public static method

Perform a bitwise NOT operation on a key (containing a string value) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseNotAsync ( IDatabase database, RedisKey destination, RedisKey key ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
key RedisKey /// The key where the data to be NOT'd is located. ///
return Task

BitwiseNotAsync() public static method

Perform a bitwise NOT operation on a key (containing a string value) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseNotAsync ( IDatabase database, RedisKey destination, RedisKey key, System.TimeSpan expires ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
key RedisKey /// The key where the data to be NOT'd is located. ///
expires System.TimeSpan /// An expiration lifetime. ///
return Task

BitwiseOr() public static method

Perform a bitwise OR operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseOr ( IDatabase database, RedisKey destination, RedisKey keys ) : long
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be OR'd are located. ///
return long

BitwiseOr() public static method

Perform a bitwise OR operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseOr ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expire ) : long
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be OR'd are located. ///
expire System.TimeSpan /// An expiration lifetime. ///
return long

BitwiseOrAsync() public static method

Perform a bitwise OR operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseOrAsync ( IDatabase database, RedisKey destination, RedisKey keys ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be OR'd are located. ///
return Task

BitwiseOrAsync() public static method

Perform a bitwise OR operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseOrAsync ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expire ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be OR'd are located. ///
expire System.TimeSpan /// An expiration lifetime. ///
return Task

BitwiseXOr() public static method

Perform a bitwise XOR operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseXOr ( IDatabase database, RedisKey destination, RedisKey keys ) : long
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be XOR'd are located. ///
return long

BitwiseXOr() public static method

Perform a bitwise XOR operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseXOr ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expires ) : long
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be XOR'd are located. ///
expires System.TimeSpan /// An expiration lifetime. ///
return long

BitwiseXOrAsync() public static method

Perform a bitwise XOR operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseXOrAsync ( IDatabase database, RedisKey destination, RedisKey keys ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be XOR'd are located. ///
return Task

BitwiseXOrAsync() public static method

Perform a bitwise XOR operation between multiple keys (containing string values) and store the result in the destination key.
http://redis.io/commands/bitop
public static BitwiseXOrAsync ( IDatabase database, RedisKey destination, RedisKey keys, System.TimeSpan expires ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
destination RedisKey /// The destination key where the result should be stored. ///
keys RedisKey /// The keys where the data to be XOR'd are located. ///
expires System.TimeSpan /// An expiration lifetime. ///
return Task

Count() public static method

Gets the count of active bits at the key supplied.
public static Count ( IDatabase database, RedisKey key, long eventId = -1 ) : long
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
key RedisKey /// The key. ///
eventId long /// You can optionally supply the id of the thing being interacted with, which will result in a count of either /// 0 or 1. ///
return long

Count() public static method

Gets the count of active bits at the key supplied.
public static Count ( RedisKey key, long eventId = -1 ) : long
key RedisKey /// The key. ///
eventId long /// You can optionally supply the id of the thing being interacted with, which will result in a count of either /// 0 or 1. ///
return long

CountAsync() public static method

Gets the count of active bits at the key supplied.
public static CountAsync ( IDatabase database, RedisKey key, long eventId = -1 ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
key RedisKey /// The key. ///
eventId long /// You can optionally supply the id of the thing being interacted with, which will result in a count of either /// 0 or 1. ///
return Task

CountAsync() public static method

Gets the count of active bits at the key supplied.
public static CountAsync ( RedisKey key, long eventId = -1 ) : Task
key RedisKey /// The key. ///
eventId long /// You can optionally supply the id of the thing being interacted with, which will result in a count of either /// 0 or 1. ///
return Task

Delete() public static method

The delete.
public static Delete ( string category, string action, string dateTime ) : bool
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime string /// The DateTime. ///
return bool

DeleteAsync() public static method

The delete.
public static DeleteAsync ( string category, string action, string dateTime ) : Task
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime string /// The DateTime. ///
return Task

Exists() public static method

Determines if the key exists.
public static Exists ( IDatabase database, RedisKey key ) : bool
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
key RedisKey /// The key. ///
return bool

Exists() public static method

Determines if the key exists.
public static Exists ( RedisKey key ) : bool
key RedisKey /// The key. ///
return bool

ExistsAsync() public static method

Determines if the key exists.
public static ExistsAsync ( IDatabase database, RedisKey key ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
key RedisKey /// The key. ///
return Task

ExistsAsync() public static method

Determines if the key exists.
public static ExistsAsync ( RedisKey key ) : Task
key RedisKey /// The key. ///
return Task

GetCounts() public static method

Gets counts by TimeInterval for the date range supplied.
/// This should never occur (unhandled TimeInterval). ///
public static GetCounts ( string category, string action, System.DateTime start, System.DateTime end, long eventId = -1, TimeInterval timeInterval = TimeInterval.FifteenMinutes, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : long>>.List
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
start System.DateTime /// The starting DateTime, inclusive. ///
end System.DateTime /// The end. ///
eventId long /// You can optionally supply the id of the thing being interacted with, which will result in a count of just /// that event. ///
timeInterval TimeInterval /// The time interval. ///
firstDayOfWeek DayOfWeek /// The first day of week (only applies when doing TimeInterval.Week groupings). ///
return long>>.List

GetCountsAsync() public static method

Gets counts by TimeInterval for the date range supplied.
/// This should never occur (unhandled TimeInterval). ///
public static GetCountsAsync ( string category, string action, System.DateTime start, System.DateTime end, long eventId = -1, TimeInterval timeInterval = TimeInterval.FifteenMinutes, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : long>>>.Task
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
start System.DateTime /// The starting DateTime, inclusive. ///
end System.DateTime /// The end. ///
eventId long /// You can optionally supply the id of the thing being interacted with, which will result in a count of just /// that event. ///
timeInterval TimeInterval /// The time interval. ///
firstDayOfWeek DayOfWeek /// The first day of week (only applies when doing TimeInterval.Week groupings). ///
return long>>>.Task

GetDay() public static method

Gets the key for the day covered by the DateTime supplied, creating the data at the key if necessary.
public static GetDay ( IDatabase database, string category, string action, System.DateTime dateTime ) : RedisKey
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
return RedisKey

GetDayAsync() public static method

Gets the key for the day covered by the DateTime supplied, creating the data at the key if necessary.
public static GetDayAsync ( IDatabase database, string category, string action, System.DateTime dateTime ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
return Task

GetFifteenMinutes() public static method

Gets the key for the 15 minute interval covered by the DateTime supplied.
public static GetFifteenMinutes ( string category, string action, System.DateTime dateTime ) : RedisKey
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
return RedisKey

GetFifteenMinutesAsync() public static method

Gets the key for the 15 minute interval covered by the DateTime supplied.
public static GetFifteenMinutesAsync ( string category, string action, System.DateTime dateTime ) : Task
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
return Task

GetHour() public static method

Gets the key for the hour covered by the DateTime supplied, creating the data at the key if necessary.
public static GetHour ( IDatabase database, string category, string action, System.DateTime dateTime ) : RedisKey
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
return RedisKey

GetHourAsync() public static method

Gets the key for the hour covered by the DateTime supplied, creating the data at the key if necessary.
public static GetHourAsync ( IDatabase database, string category, string action, System.DateTime dateTime ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
return Task

GetMinKeysForRange() public static method

Gets the fewest number of keys required to cover the date range supplied.
public static GetMinKeysForRange ( IDatabase database, string category, string action, System.DateTime start, System.DateTime end, TimeInterval timeInterval = TimeInterval.FifteenMinutes ) : RedisKey[]
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
start System.DateTime /// The starting DateTime, inclusive. ///
end System.DateTime /// The ending DateTime, exclusive. ///
timeInterval TimeInterval /// The accuracy at which we want the data. For example, setting this to TimeInterval.OneDay means there won't /// be any keys at the fifteen minute or one hour levels, so if the DateTime is for the /// middle of a day, it'll include the entire day. ///
return RedisKey[]

GetMinKeysForRangeAsync() public static method

Gets the fewest number of keys required to cover the date range supplied.
public static GetMinKeysForRangeAsync ( IDatabase database, string category, string action, System.DateTime start, System.DateTime end, TimeInterval timeInterval = TimeInterval.FifteenMinutes ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
start System.DateTime /// The starting DateTime, inclusive. ///
end System.DateTime /// The ending DateTime, exclusive. ///
timeInterval TimeInterval /// The accuracy at which we want the data. For example, setting this to TimeInterval.OneDay means there won't /// be any keys at the fifteen minute or one hour levels, so if the DateTime is for the /// middle of a day, it'll include the entire day. ///
return Task

GetMonth() public static method

Gets the key for the month covered by the DateTime supplied, creating the data at the key if necessary.
public static GetMonth ( IDatabase database, string category, string action, System.DateTime dateTime ) : RedisKey
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
return RedisKey

GetMonthAsync() public static method

Gets the key for the month covered by the DateTime supplied, creating the data at the key if necessary.
public static GetMonthAsync ( IDatabase database, string category, string action, System.DateTime dateTime ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
return Task

GetQuarter() public static method

Gets the keys for the months in the quarter covered by the DateTime supplied, creating the data at the key if necessary.
public static GetQuarter ( IDatabase database, string category, string action, System.DateTime dateTime ) : RedisKey
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
return RedisKey

GetQuarterAsync() public static method

Gets the keys for the months in the quarter covered by the DateTime supplied, creating the data at the key if necessary.
public static GetQuarterAsync ( IDatabase database, string category, string action, System.DateTime dateTime ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
return Task

GetWeek() public static method

The get week.
public static GetWeek ( IDatabase database, string category, string action, System.DateTime dateTime, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : RedisKey
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
firstDayOfWeek DayOfWeek /// The first day to start each week. Defaults to Sunday which is used in the US, CA, and JP. You can /// change it to Monday to get weekly aggregates which are accurate for other countries, but it'll double /// the weekly data stored. ///
return RedisKey

GetWeekAsync() public static method

The get week.
public static GetWeekAsync ( IDatabase database, string category, string action, System.DateTime dateTime, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : Task
database IDatabase /// The database where the query will be performed. This is passed so that we can reuse the same database to /// perform multiple bitwise operations. Doing this with the same connection will guarantee that performance /// is good. ///
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
dateTime System.DateTime /// The DateTime. ///
firstDayOfWeek DayOfWeek /// The first day to start each week. Defaults to Sunday which is used in the US, CA, and JP. You can /// change it to Monday to get weekly aggregates which are accurate for other countries, but it'll double /// the weekly data stored. ///
return Task

HasEvent() public static method

Determines if an event occured.
public static HasEvent ( string category, string action, long eventId, System.DateTime start = default(DateTime), System.DateTime end = default(DateTime) ) : bool
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
eventId long /// The id of the thing being interacted with. ///
start System.DateTime /// The start of the period we're interested in, defaulting to now. ///
end System.DateTime /// The end of the period we're interested in, defaulting to now. ///
return bool

HasEventAsync() public static method

Determines if an event occured.
public static HasEventAsync ( string category, string action, long eventId, System.DateTime start = default(DateTime), System.DateTime end = default(DateTime) ) : Task
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
eventId long /// The id of the thing being interacted with. ///
start System.DateTime /// The start of the period we're interested in, defaulting to now. ///
end System.DateTime /// The end of the period we're interested in, defaulting to now. ///
return Task

TrackEvent() public static method

Tracks an event.
public static TrackEvent ( string category, string action, long eventId, TimePrecision precision = TimePrecision.OneDay, System.DateTime now = default(DateTime) ) : void
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
eventId long /// The id of the thing being interacted with. ///
precision TimePrecision /// The precision that this event should be tracked at. ///
now System.DateTime /// The now. ///
return void

TrackEventAsync() public static method

Tracks an event.
public static TrackEventAsync ( string category, string action, long eventId, TimePrecision precision = TimePrecision.OneDay, System.DateTime now = default(DateTime) ) : System.Threading.Tasks.Task
category string /// Typically the object that was interacted with (e.g. button) ///
action string /// The type of interaction (e.g. click) ///
eventId long /// The id of the thing being interacted with. ///
precision TimePrecision /// The precision that this event should be tracked at. ///
now System.DateTime /// The now. ///
return System.Threading.Tasks.Task