ostore.cache
Class CacheToDisk
java.lang.Object
|
+--ostore.cache.CacheToDisk
- public class CacheToDisk
- extends Object
Disk Interface - Read and Write using Simple Java I/O.
Writes the actual Cacheable to disk using the CacheableIdentity
for naming. If the CacheableIdentity stores more than 1 attribute (ie
has guid and vhash), softlinks will be used.
Also creates 5 directoris specified in cachedir by the config files
- Version:
- $ID: CacheToDisk.java, v 1.0
- Author:
- Larry H. Tung
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheToDisk
protected CacheToDisk(String cachedir,
NodeId node_id)
instanciate
public static void instanciate(String cachedir,
NodeId node_id)
instance
public static CacheToDisk instance(NodeId node_id)
fullString
public String fullString(SecureHash shash,
int type)
- Converts all bytes of this SecureHash to a human-readable String
- Parameters:
type
- id of object to be written to diskshash
- SecureHash to be used to write to disk
- Returns:
- human-readable String representation of this Hash
containing every nibble of this Hash's value and prepending
a path to it, in this case /temp/
tag indicates what type of data is being written to disk