Method | Description | |
---|---|---|
Contains ( ID key, ID hash ) : bool |
Do we have the specified value for the given key?
|
|
ContainsKey ( ID key ) : bool |
Do we have any data for the given key?
|
|
ContainsTag ( ID tag_id ) : bool | ||
ContainsUrl ( ID tag_id, Uri uri ) : bool | ||
Expire ( ) : void |
Expire old entries
|
|
Get ( ID key ) : IList |
Get all data values for the given key, or an empty list.
|
|
Get ( ID key, ID hash ) : string |
Get a particular value by key and hash, or null.
|
|
GetAllElements ( ) : IList |
||
GetHashes ( ID key ) : IList |
Gets a list of all value hashes for the given key It's a copy, iterate all you want.
|
|
GetKeys ( ) : IList |
Get all IDs, so we can go through and republish everything. It's a copy so you can iterate it all you want.
|
|
GetPublicationTime ( ID tag_id, Uri uri ) : DateTime | ||
GetPublicationTime ( ID key, ID hash ) : DateTime? |
Returns when the given value was last inserted by its original publisher, or null if the value isn't present.
|
|
LocalStorage ( ) : System |
Make a new LocalStorage. Uses the executing assembly's name to determine the filename for on-disk storage. If another LocalStorage on the machine is already using that file, we use a temp directory.
|
|
Put ( ID key, ID hash, string val, DateTime timestamp, TimeSpan keepFor ) : void |
Store a key/value pair published originally at the given UTC timestamp. Value is kept until keepTime past timestamp.
|
|
Put ( ID tag_id, Uri uri, DateTime publicationTime ) : void | ||
RefreshResource ( ID tag_id, Uri uri, DateTime timestamp ) : void | ||
Restamp ( ID key, ID hash, DateTime newStamp, TimeSpan newKeep ) : void |
Change the timing information on an existing entry, if extant.
|
|
SearchFor ( string query ) : KademliaResource[] | ||
StoreResource ( CompleteTag tag, Uri uri, DateTime publicationTime ) : void |
Method | Description | |
---|---|---|
BackgroundSave ( ) : void |
Save the store in the background. PRECONSITION: We have the mutex and diskFilename is set.
|
|
CreatePath ( string path ) : void |
Create all folders in a path, if missing.
|
|
PathFor ( ID key, ID hash ) : string |
Where should we save a particular value?
|
|
SaveIndex ( ) : void |
Save the index now.
|
public ContainsUrl ( ID tag_id, Uri uri ) : bool | ||
tag_id | ID | |
uri | Uri | |
return | bool |
public GetPublicationTime ( ID tag_id, Uri uri ) : DateTime | ||
tag_id | ID | |
uri | Uri | |
return | DateTime |
public GetPublicationTime ( ID key, ID hash ) : DateTime? | ||
key | ID | |
hash | ID | |
return | DateTime? |
public Put ( ID key, ID hash, string val, DateTime timestamp, TimeSpan keepFor ) : void | ||
key | ID | |
hash | ID | The hash of the value |
val | string | |
timestamp | DateTime | |
keepFor | TimeSpan | |
return | void |
public Put ( ID tag_id, Uri uri, DateTime publicationTime ) : void | ||
tag_id | ID | |
uri | Uri | |
publicationTime | DateTime | |
return | void |
public RefreshResource ( ID tag_id, Uri uri, DateTime timestamp ) : void | ||
tag_id | ID | |
uri | Uri | |
timestamp | DateTime | |
return | void |
public Restamp ( ID key, ID hash, DateTime newStamp, TimeSpan newKeep ) : void | ||
key | ID | |
hash | ID | |
newStamp | DateTime | |
newKeep | TimeSpan | |
return | void |
public SearchFor ( string query ) : KademliaResource[] | ||
query | string | |
return | KademliaResource[] |
public StoreResource ( CompleteTag tag, Uri uri, DateTime publicationTime ) : void | ||
tag | CompleteTag | |
uri | Uri | |
publicationTime | DateTime | |
return | void |