1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | #import <Foundation/Foundation.h>
|
10 |
|
11 | @interface RNBranchAgingDictionary<KeyType, ObjectType> : NSObject
|
12 |
|
13 | @property (nonatomic, readonly) NSTimeInterval ttl;
|
14 |
|
15 | #pragma mark - Object lifecycle
|
16 |
|
17 | - (instancetype _Nonnull)init NS_UNAVAILABLE;
|
18 | - (instancetype _Nonnull)initWithTtl:(NSTimeInterval)ttl NS_DESIGNATED_INITIALIZER;
|
19 |
|
20 | + (instancetype _Nonnull)dictionaryWithTtl:(NSTimeInterval)ttl;
|
21 |
|
22 | #pragma mark - Methods from NSMutableDictionary
|
23 |
|
24 | - (void)setObject:(ObjectType _Nonnull)object forKey:(KeyType<NSCopying> _Nonnull)key;
|
25 | - (void)setObject:(ObjectType _Nonnull)object forKeyedSubscript:(KeyType<NSCopying> _Nonnull)key;
|
26 |
|
27 | - (nullable ObjectType)objectForKey:(KeyType _Nonnull)key;
|
28 | - (nullable ObjectType)objectForKeyedSubscript:(KeyType _Nonnull)key;
|
29 |
|
30 | - (void)removeObjectForKey:(KeyType _Nonnull)key;
|
31 |
|
32 | @end
|