net.tomp2p.storage
Class StorageDisk

java.lang.Object
  extended by net.tomp2p.storage.Storage
      extended by net.tomp2p.storage.StorageDisk
All Implemented Interfaces:
Digest, Responsibility

public class StorageDisk
extends Storage
implements Responsibility


Nested Class Summary
 
Nested classes/interfaces inherited from class net.tomp2p.storage.Storage
Storage.ProtectionEnable, Storage.ProtectionMode
 
Constructor Summary
StorageDisk(String homeDirectory)
           
 
Method Summary
 void close()
           
 boolean contains(Number480 key)
           
 DigestInfo digest(Number320 key)
           
 DigestInfo digest(Number320 key, Collection<Number160> contentKeys)
           
 Collection<Number160> findContentForResponsiblePeerID(Number160 peerID)
           
 Number160 findPeerIDForResponsibleContent(Number160 locationKey)
           
 Data get(Number480 key)
           
 SortedMap<Number480,Data> get(Number480 fromKey, Number480 toKey)
           
 void iterateAndRun(Number160 locationKey, StorageRunner runner)
           
 boolean put(Number480 key, Data newData, PublicKey publicKey, boolean putIfAbsent, boolean domainProtection)
           
 SortedMap<Number480,Data> remove(Number480 fromKey, Number480 toKey, PublicKey publicKey)
           
 Data remove(Number480 key, PublicKey publicKey)
           
 void removeResponsibility(Number160 locationKey)
           
 Collection<Number480> storedDirectReplication()
           
 boolean updateResponsibilities(Number160 locationKey, Number160 peerID)
           
 
Methods inherited from class net.tomp2p.storage.Storage
get, getProtectionDomainEnable, getProtectionDomainMode, getProtectionEntryEnable, getProtectionEntryMode, remove, removeDomainProtection, setProtection, setProtectionDomainEnable, setProtectionDomainMode, setProtectionEntryEnable, setProtectionEntryMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorageDisk

public StorageDisk(String homeDirectory)
            throws Exception
Throws:
Exception
Method Detail

close

public void close()
Specified by:
close in class Storage

put

public boolean put(Number480 key,
                   Data newData,
                   PublicKey publicKey,
                   boolean putIfAbsent,
                   boolean domainProtection)
Specified by:
put in class Storage

get

public Data get(Number480 key)
Specified by:
get in class Storage

get

public SortedMap<Number480,Data> get(Number480 fromKey,
                                     Number480 toKey)
Specified by:
get in class Storage

remove

public Data remove(Number480 key,
                   PublicKey publicKey)
Specified by:
remove in class Storage

remove

public SortedMap<Number480,Data> remove(Number480 fromKey,
                                        Number480 toKey,
                                        PublicKey publicKey)
Specified by:
remove in class Storage

contains

public boolean contains(Number480 key)
Specified by:
contains in class Storage

digest

public DigestInfo digest(Number320 key)
Specified by:
digest in interface Digest

digest

public DigestInfo digest(Number320 key,
                         Collection<Number160> contentKeys)
Specified by:
digest in interface Digest

iterateAndRun

public void iterateAndRun(Number160 locationKey,
                          StorageRunner runner)
Specified by:
iterateAndRun in class Storage

findContentForResponsiblePeerID

public Collection<Number160> findContentForResponsiblePeerID(Number160 peerID)
Specified by:
findContentForResponsiblePeerID in interface Responsibility

findPeerIDForResponsibleContent

public Number160 findPeerIDForResponsibleContent(Number160 locationKey)
Specified by:
findPeerIDForResponsibleContent in interface Responsibility

updateResponsibilities

public boolean updateResponsibilities(Number160 locationKey,
                                      Number160 peerID)
Specified by:
updateResponsibilities in interface Responsibility

storedDirectReplication

public Collection<Number480> storedDirectReplication()
Specified by:
storedDirectReplication in class Storage

removeResponsibility

public void removeResponsibility(Number160 locationKey)
Specified by:
removeResponsibility in interface Responsibility


Copyright © 2011. All Rights Reserved.