net.tomp2p.storage
Class StorageDisk

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

public class StorageDisk
extends StorageGeneric


Nested Class Summary
 
Nested classes/interfaces inherited from class net.tomp2p.storage.StorageGeneric
StorageGeneric.ProtectionEnable, StorageGeneric.ProtectionMode
 
Constructor Summary
StorageDisk(String fileName)
           
 
Method Summary
 void addTimeout(Number160 locationKey, Number160 domainKey, Number160 contentKey, long expiration)
           
 void close()
           
 boolean contains(Number160 locationKey, Number160 domainKey, Number160 contentKey)
           
 Collection<Number160> findContentForResponsiblePeerID(Number160 peerID)
           
 Number160 findPeerIDForResponsibleContent(Number160 locationKey)
           
 Data get(Number160 locationKey, Number160 domainKey, Number160 contentKey)
           
 boolean isDomainProtectedByOthers(Number160 locationKey, Number160 domainKey, PublicKey publicKey)
           
 boolean protectDomain(Number160 locationKey, Number160 domainKey, PublicKey publicKey)
           
 boolean put(Number160 locationKey, Number160 domainKey, Number160 contentKey, Data value)
           
 Data remove(Number160 locationKey, Number160 domainKey, Number160 contentKey)
           
 void removeResponsibility(Number160 locationKey)
           
 void removeTimeout(Number160 locationKey, Number160 domainKey, Number160 contentKey)
           
 Map<Number480,Data> subMap(Number160 locationKey)
           
 SortedMap<Number480,Data> subMap(Number160 locationKey, Number160 domainKey, Number160 fromContentKey, Number160 toContentKey)
           
 Collection<Number480> subMapTimeout(long to)
           
 boolean updateResponsibilities(Number160 locationKey, Number160 peerId)
           
 
Methods inherited from class net.tomp2p.storage.StorageGeneric
checkTimeout, compareAndPut, digest, findContentResponsibility, findResponsiblePeers, get, getProtectionDomainEnable, getProtectionDomainMode, getProtectionEntryEnable, getProtectionEntryMode, put, remove, remove, removeContentResponsibility, removeDomainProtection, setProtection, setProtectionDomainEnable, setProtectionDomainMode, setProtectionEntryEnable, setProtectionEntryMode, updateContentResponsibilities
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorageDisk

public StorageDisk(String fileName)
Method Detail

close

public void close()

put

public boolean put(Number160 locationKey,
                   Number160 domainKey,
                   Number160 contentKey,
                   Data value)

get

public Data get(Number160 locationKey,
                Number160 domainKey,
                Number160 contentKey)

contains

public boolean contains(Number160 locationKey,
                        Number160 domainKey,
                        Number160 contentKey)

remove

public Data remove(Number160 locationKey,
                   Number160 domainKey,
                   Number160 contentKey)

subMap

public SortedMap<Number480,Data> subMap(Number160 locationKey,
                                        Number160 domainKey,
                                        Number160 fromContentKey,
                                        Number160 toContentKey)

subMap

public Map<Number480,Data> subMap(Number160 locationKey)

addTimeout

public void addTimeout(Number160 locationKey,
                       Number160 domainKey,
                       Number160 contentKey,
                       long expiration)

removeTimeout

public void removeTimeout(Number160 locationKey,
                          Number160 domainKey,
                          Number160 contentKey)

subMapTimeout

public Collection<Number480> subMapTimeout(long to)

protectDomain

public boolean protectDomain(Number160 locationKey,
                             Number160 domainKey,
                             PublicKey publicKey)

isDomainProtectedByOthers

public boolean isDomainProtectedByOthers(Number160 locationKey,
                                         Number160 domainKey,
                                         PublicKey publicKey)

findPeerIDForResponsibleContent

public Number160 findPeerIDForResponsibleContent(Number160 locationKey)

findContentForResponsiblePeerID

public Collection<Number160> findContentForResponsiblePeerID(Number160 peerID)

updateResponsibilities

public boolean updateResponsibilities(Number160 locationKey,
                                      Number160 peerId)

removeResponsibility

public void removeResponsibility(Number160 locationKey)


Copyright © 2012. All Rights Reserved.