站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

FileSystem.AtomicAction (NetBeans APIs) - NetBeans API Javadoc 4.1.0


org.openide.filesystems
Interface FileSystem.AtomicAction

Enclosing interface:
FileSystem

public static interface FileSystem.AtomicAction

An action that it is to be called atomically with respect to filesystem event notification. During its execution (via runAtomicAction) no events about changes in filesystems are fired.

Nomenclature warning: the action is by no means "atomic" in the usual sense of the word, i.e. either running to completion or rolling back. There is no rollback support. The actual semantic property here is close to "isolation" - the action appears as a single operation as far as listeners are concerned - but not quite, since it is perfectly possible for some other thread to see half of the action if it happens to run during that time. Generally it is a mistake to assume that using AtomicAction gives you any kind of consistency guarantees; rather, it avoids producing change events too early and thus causing listener code to run before it should.


Method Summary
 void run()
          Executed when it is guaranteed that no events about changes in filesystems will be notified.
 

Method Detail

run

public void run()
         throws IOException
Executed when it is guaranteed that no events about changes in filesystems will be notified.

Throws:
IOException - if there is an error during execution


Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.