Constructor and Description |
---|
NotifyChangeHandler(DiskDeviceContext diskCtx)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addNotifyRequest(NotifyRequest req)
Add a request to the change notification list
|
protected Vector |
findMatchingRequests(int typ,
String path,
boolean isdir)
Find notify requests that match the type and path
|
int |
getGlobalNotifyMask()
Return the global notify filter mask
|
int |
getRequestQueueSize()
Return the notify request queue size
|
boolean |
hasAttributeChange()
Determine if the filter has attribute change notification
|
boolean |
hasDebug()
Check if debug output is enabled
|
boolean |
hasDirectoryNameChange()
Determine if the filter has directory name change notification, triggered if a directory is created or deleted.
|
boolean |
hasFileAccessTimeChange()
Determine if the filter has last access time change notification
|
boolean |
hasFileCreateTimeChange()
Determine if the filter has creation time change notification
|
boolean |
hasFileNameChange()
Determine if the filter has file name change notification, triggered if a file is created, renamed or deleted
|
boolean |
hasFileSizeChange()
Determine if the filter has file size change notification
|
boolean |
hasFileWriteTimeChange()
Determine if the filter has last write time change notification
|
boolean |
hasSecurityDescriptorChange()
Determine if the filter has the security descriptor change notification
|
void |
notifyAttributesChanged(String path,
boolean isdir)
Attributes changed notification
|
void |
notifyCreationTimeChanged(String path,
boolean isdir)
Creation time changed notification
|
void |
notifyDirectoryChanged(int action,
String path)
Directory changed notification
|
void |
notifyFileChanged(int action,
String path)
File changed notification
|
void |
notifyFileSizeChanged(String path)
File size changed notification
|
void |
notifyLastAccessTimeChanged(String path,
boolean isdir)
Last access time changed notification
|
void |
notifyLastWriteTimeChanged(String path,
boolean isdir)
Last write time changed notification
|
void |
notifyRename(String oldName,
String newName)
File/directory renamed notification
|
void |
notifySecurityDescriptorChanged(String path,
boolean isdir)
Security descriptor changed notification
|
protected void |
queueNotification(NotifyChangeEvent evt)
Queue a change notification event for processing
|
void |
removeNotifyRequest(NotifyRequest req)
Remove a request from the notify change request list
|
void |
removeNotifyRequest(NotifyRequest req,
boolean updateMask)
Remove a request from the notify change request list
|
void |
removeNotifyRequests(SMBSrvSession sess)
Remove all notification requests owned by the specified session
|
void |
run()
Asynchronous change notification processing thread
|
void |
sendBufferedNotifications(NotifyRequest req,
NotifyChangeEventList evtList)
Send buffered change notifications for a session
|
protected int |
sendChangeNotification(NotifyChangeEvent evt)
Send change notifications to sessions with notification enabled that match the change event.
|
void |
setDebug(boolean ena)
Enable debug output
|
void |
shutdownRequest()
Shutdown the change notification processing thread
|
public NotifyChangeHandler(DiskDeviceContext diskCtx)
diskCtx
- DiskDeviceContextpublic final void addNotifyRequest(NotifyRequest req)
req
- NotifyRequestpublic final void removeNotifyRequest(NotifyRequest req)
req
- NotifyRequestpublic final void removeNotifyRequest(NotifyRequest req, boolean updateMask)
req
- NotifyRequestupdateMask
- booleanpublic final void removeNotifyRequests(SMBSrvSession sess)
sess
- SMBSrvSessionpublic final boolean hasFileNameChange()
public final boolean hasDirectoryNameChange()
public final boolean hasAttributeChange()
public final boolean hasFileSizeChange()
public final boolean hasFileWriteTimeChange()
public final boolean hasFileAccessTimeChange()
public final boolean hasFileCreateTimeChange()
public final boolean hasSecurityDescriptorChange()
public final boolean hasDebug()
public final int getGlobalNotifyMask()
public final int getRequestQueueSize()
public final void notifyFileChanged(int action, String path)
action
- intpath
- Stringpublic final void notifyRename(String oldName, String newName)
oldName
- StringnewName
- Stringpublic final void notifyDirectoryChanged(int action, String path)
action
- intpath
- Stringpublic final void notifyAttributesChanged(String path, boolean isdir)
path
- Stringisdir
- booleanpublic final void notifyFileSizeChanged(String path)
path
- Stringpublic final void notifyLastWriteTimeChanged(String path, boolean isdir)
path
- Stringisdir
- booleanpublic final void notifyLastAccessTimeChanged(String path, boolean isdir)
path
- Stringisdir
- booleanpublic final void notifyCreationTimeChanged(String path, boolean isdir)
path
- Stringisdir
- booleanpublic final void notifySecurityDescriptorChanged(String path, boolean isdir)
path
- Stringisdir
- booleanpublic final void setDebug(boolean ena)
ena
- booleanpublic final void shutdownRequest()
public final void sendBufferedNotifications(NotifyRequest req, NotifyChangeEventList evtList)
req
- NotifyRequestevtList
- NotifyChangeEventListprotected final void queueNotification(NotifyChangeEvent evt)
evt
- NotifyChangeEventprotected final int sendChangeNotification(NotifyChangeEvent evt)
evt
- NotifyChangeEventprotected final Vector findMatchingRequests(int typ, String path, boolean isdir)
typ
- intpath
- Stringisdir
- booleanCopyright © 2005–2018 Alfresco Software. All rights reserved.