/** * Detaches this file, invalidating all cached info. This will force a call to {@link #doAttach} next time this file * is used. * * @throws Exception if an error occurs. */ private void detach() throws Exception { synchronized (fs) { if (attached) { try { doDetach(); } finally { attached = false; setFileType(null); parent = null; // fs.fileDetached(this); removeChildrenCache(); // children = null; } } } }
/** * Detaches this file, invalidating all cached info. This will force a call to {@link #doAttach} next time this file * is used. * * @throws Exception if an error occurs. */ private void detach() throws Exception { synchronized (fileSystem) { if (attached) { try { doDetach(); } finally { attached = false; setFileType(null); parent = null; // fs.fileDetached(this); removeChildrenCache(); // children = null; } } } }
/** * Detaches this file, invaliating all cached info. This will force * a call to {@link #doAttach} next time this file is used. * @throws Exception if an error occurs. */ private void detach() throws Exception { synchronized (fs) { if (attached) { try { doDetach(); } finally { attached = false; setFileType(null); parent = null; // fs.fileDetached(this); removeChildrenCache(); // children = null; } } } }
/** * Detaches this file, invalidating all cached info. This will force a call to {@link #doAttach} next time this file * is used. * * @throws Exception if an error occurs. */ private void detach() throws Exception { synchronized (monitorLock) { if (isAttached()) { try { doDetach(); } finally { setAttached(false); injectType(null); parent = null; // fs.fileDetached(this); removeChildrenCache(); // children = null; } } } }
/** * Called when this file is created. Updates cached info and notifies the parent and file system. * * @param newType The type of the file. * @throws Exception if an error occurs. */ protected void handleCreate(final FileType newType) throws Exception { synchronized (fs) { if (attached) { // Fix up state injectType(newType); removeChildrenCache(); // Notify subclass onChange(); } // Notify parent that its child list may no longer be valid notifyParent(this.getName(), newType); // Notify the file system fs.fireFileCreated(this); } }
/** * Called when this file is deleted. Updates cached info and notifies subclasses, parent and file system. * * @throws Exception if an error occurs. */ protected void handleDelete() throws Exception { synchronized (fileSystem) { if (attached) { // Fix up state injectType(FileType.IMAGINARY); removeChildrenCache(); // Notify subclass onChange(); } // Notify parent that its child list may no longer be valid notifyParent(this.getName(), FileType.IMAGINARY); // Notify the file system fileSystem.fireFileDeleted(this); } }
/** * Called when this file is deleted. Updates cached info and notifies subclasses, parent and file system. * * @throws Exception if an error occurs. */ protected void handleDelete() throws Exception { synchronized (fs) { if (attached) { // Fix up state injectType(FileType.IMAGINARY); removeChildrenCache(); // Notify subclass onChange(); } // Notify parent that its child list may no longer be valid notifyParent(this.getName(), FileType.IMAGINARY); // Notify the file system fs.fireFileDeleted(this); } }
/** * Called when this file is created. Updates cached info and notifies the parent and file system. * * @param newType The type of the file. * @throws Exception if an error occurs. */ protected void handleCreate(final FileType newType) throws Exception { synchronized (fileSystem) { if (attached) { // Fix up state injectType(newType); removeChildrenCache(); // Notify subclass onChange(); } // Notify parent that its child list may no longer be valid notifyParent(this.getName(), newType); // Notify the file system fileSystem.fireFileCreated(this); } }
/** * Called when this file is deleted. Updates cached info and notifies * subclasses, parent and file system. * @throws Exception if an error occurs. */ protected void handleDelete() throws Exception { synchronized (fs) { if (attached) { // Fix up state injectType(FileType.IMAGINARY); removeChildrenCache(); // Notify subclass onChange(); } // Notify parent that its child list may no longer be valid notifyParent(this.getName(), FileType.IMAGINARY); // Notify the file system fs.fireFileDeleted(this); } }
/** * Called when this file is created. Updates cached info and notifies * the parent and file system. * * @param newType The type of the file. * @throws Exception if an error occurs. */ protected void handleCreate(final FileType newType) throws Exception { synchronized (fs) { if (attached) { // Fix up state injectType(newType); removeChildrenCache(); // Notify subclass onChange(); } // Notify parent that its child list may no longer be valid notifyParent(this.getName(), newType); // Notify the file system fs.fireFileCreated(this); } }
/** * Called when this file is deleted. Updates cached info and notifies subclasses, parent and file system. * * @throws Exception if an error occurs. */ protected void handleDelete() throws Exception { synchronized (monitorLock) { if (isAttached()) { // Fix up state injectType(FileType.IMAGINARY); removeChildrenCache(); // Notify subclass onChange(); } // Notify parent that its child list may no longer be valid notifyParent(this.getName(), FileType.IMAGINARY); // Notify the file system fs.fireFileDeleted(this); } }
/** * Called when this file is created. Updates cached info and notifies the parent and file system. * * @param newType The type of the file. * @throws Exception if an error occurs. */ protected void handleCreate(final FileType newType) throws Exception { synchronized (monitorLock) { if (isAttached()) { // Fix up state injectType(newType); removeChildrenCache(); // Notify subclass onChange(); } // Notify parent that its child list may no longer be valid notifyParent(this.getName(), newType); // Notify the file system fs.fireFileCreated(this); } }