#include <autoscan.h>
Public Member Functions | |
| AutoscanList () | |
| int | add (zmm::Ref< AutoscanDirectory > dir) |
| Adds a new AutoscanDirectory to the list. | |
| void | addList (zmm::Ref< AutoscanList > list) |
| zmm::Ref< AutoscanDirectory > | get (int id) |
| zmm::Ref< AutoscanDirectory > | get (zmm::String location) |
| zmm::Ref< AutoscanDirectory > | getByObjectID (int objectID) |
| int | size () |
| void | remove (int id) |
| removes the AutoscanDirectory given by its scan ID | |
| int | removeByObjectID (int objectID) |
| int | remove (zmm::String location) |
| removes the AutoscanDirectory with the given location | |
| zmm::Ref< AutoscanList > | removeIfSubdir (zmm::String parent, bool persistent=false) |
| removes the AutoscanDirectory if it is a subdirectory of a given location. | |
| void | notifyAll (zmm::Ref< TimerSubscriberSingleton< Object > > obj) |
| Send notification for each directory that is stored in the list. | |
| void | updateLMinDB () |
| updates the last_modified data for all AutoscanDirectories. | |
| zmm::Ref< zmm::Array < AutoscanDirectory > > | getArrayCopy () |
| returns a copy of the autoscan list in the form of an array | |
| void | retain () |
| void | release () |
| int | getRefCount () |
Static Public Member Functions | |
| static void * | operator new (size_t size) |
| static void | operator delete (void *ptr) |
Protected Member Functions | |
| int | _add (zmm::Ref< AutoscanDirectory > dir) |
Protected Attributes | |
| zmm::Ref< Mutex > | mutex |
| zmm::Ref< zmm::Array < AutoscanDirectory > > | list |
| mt_atomic_t | _ref_count |
Definition at line 58 of file autoscan.h.
| AutoscanList::AutoscanList | ( | ) |
Definition at line 78 of file autoscan.cc.
Referenced by removeIfSubdir().
| int AutoscanList::_add | ( | zmm::Ref< AutoscanDirectory > | dir | ) | [protected] |
Definition at line 102 of file autoscan.cc.
References _, _Exception, list, and nil.
| int AutoscanList::add | ( | zmm::Ref< AutoscanDirectory > | dir | ) |
Adds a new AutoscanDirectory to the list.
The scanID of the directory is invalidated and set to the index in the AutoscanList.
| dir | AutoscanDirectory to add to the list. |
Definition at line 96 of file autoscan.cc.
| void AutoscanList::addList | ( | zmm::Ref< AutoscanList > | list | ) |
| Ref< AutoscanDirectory > AutoscanList::get | ( | zmm::String | location | ) |
| Ref< AutoscanDirectory > AutoscanList::get | ( | int | id | ) |
| Ref< Array< AutoscanDirectory > > AutoscanList::getArrayCopy | ( | ) |
returns a copy of the autoscan list in the form of an array
Definition at line 149 of file autoscan.cc.
| Ref< AutoscanDirectory > AutoscanList::getByObjectID | ( | int | objectID | ) |
| int Object::getRefCount | ( | ) | [inherited] |
Definition at line 78 of file object.cc.
References zmm::Object::_ref_count, and atomic_get().
| void AutoscanList::notifyAll | ( | zmm::Ref< TimerSubscriberSingleton< Object > > | obj | ) |
Send notification for each directory that is stored in the list.
| obj | instance of the class that will receive the notifications. |
| void Object::operator delete | ( | void * | ptr | ) | [static, inherited] |
| void * Object::operator new | ( | size_t | size | ) | [static, inherited] |
| void Object::release | ( | ) | [inherited] |
Definition at line 66 of file object.cc.
References zmm::Object::_ref_count, atomic_dec(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::clear(), zmm::String::operator=(), DSOHash< zmm::Array< CacheObject > >::releaseData(), DSBHash< VT >::releaseData(), DSOHash< zmm::Array< CacheObject > >::remove(), zmm::ArrayBase::remove(), zmm::ArrayBase::removeUnordered(), zmm::ArrayBase::set(), zmm::ArrayBase::~ArrayBase(), DSOHash< zmm::Array< CacheObject > >::~DSOHash(), zmm::ObjectQueue< AutoscanDirectory >::~ObjectQueue(), zmm::ObjectStack< Element >::~ObjectStack(), and zmm::String::~String().
| int AutoscanList::remove | ( | zmm::String | location | ) |
removes the AutoscanDirectory with the given location
| location | the location to remove |
Definition at line 242 of file autoscan.cc.
References AUTOLOCK, INVALID_SCAN_ID, list, mutex, and nil.
| void AutoscanList::remove | ( | int | id | ) |
removes the AutoscanDirectory given by its scan ID
Definition at line 193 of file autoscan.cc.
References AUTOLOCK, INVALID_SCAN_ID, list, log_debug, mutex, and nil.
| int AutoscanList::removeByObjectID | ( | int | objectID | ) |
Definition at line 218 of file autoscan.cc.
References AUTOLOCK, INVALID_SCAN_ID, list, mutex, and nil.
| Ref< AutoscanList > AutoscanList::removeIfSubdir | ( | zmm::String | parent, | |
| bool | persistent = false | |||
| ) |
removes the AutoscanDirectory if it is a subdirectory of a given location.
| parent | parent directory. | |
| persistent | also remove persistent directories. |
Definition at line 266 of file autoscan.cc.
References AUTOLOCK, AutoscanList(), INVALID_SCAN_ID, list, mutex, and nil.
| void Object::retain | ( | ) | [inherited] |
Definition at line 58 of file object.cc.
References zmm::Object::_ref_count, atomic_inc(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::append(), zmm::ObjectQueue< AutoscanDirectory >::enqueue(), zmm::ArrayBase::insert(), zmm::String::operator=(), zmm::ObjectStack< Element >::push(), DSOHash< zmm::Array< CacheObject > >::put(), DSBHash< VT >::put(), zmm::ArrayBase::set(), and zmm::String::String().
| int AutoscanList::size | ( | ) | [inline] |
Definition at line 80 of file autoscan.h.
| void AutoscanList::updateLMinDB | ( | ) |
updates the last_modified data for all AutoscanDirectories.
Definition at line 84 of file autoscan.cc.
References AUTOLOCK, Storage::getInstance(), list, log_debug, mutex, and nil.
mt_atomic_t zmm::Object::_ref_count [protected, inherited] |
Definition at line 54 of file object.h.
Referenced by zmm::Object::getRefCount(), zmm::Object::Object(), zmm::Object::release(), and zmm::Object::retain().
zmm::Ref<zmm::Array<AutoscanDirectory> > AutoscanList::list [protected] |
Definition at line 128 of file autoscan.h.
Referenced by _add(), AutoscanList(), get(), getArrayCopy(), getByObjectID(), remove(), removeByObjectID(), removeIfSubdir(), and updateLMinDB().
zmm::Ref<Mutex> AutoscanList::mutex [protected] |
Reimplemented from zmm::Object.
Definition at line 127 of file autoscan.h.
Referenced by add(), addList(), AutoscanList(), get(), getArrayCopy(), getByObjectID(), remove(), removeByObjectID(), removeIfSubdir(), and updateLMinDB().
1.6.1