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

org.netbeans.modules.vcscore.turbo (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

Package org.netbeans.modules.vcscore.turbo

Uniforms access to versioning file attributes in remote repositories and their local caching.

See:
          Description

Interface Summary
TurboListener Turbo.setMeta callbacks contract.
 

Class Summary
FileProperties Additional metadata for files in versioning system working directory.
FolderEntry Virtual file descriptor.
FolderProperties Describes additional folder properties, namely listings of repository side folders cached for FS virtual files purpose and in future for Versioning Explorer UI.
IgnoreList Represents .ignorelist or equivalent listing files that should not be versioned in repository.
RepositoryFiles Keeps track of all recently known repository files.
Statuses Enumerates statuses with special meaning for VcsFileSystem.
Turbo Client code main entry point.
TurboEvent Event describing FileObject's FileProperties change.
TurboUtil Various utility methods eliminating boilerplate constructions over Turbo API goes here.
 

Package org.netbeans.modules.vcscore.turbo Description

Uniforms access to versioning file attributes in remote repositories and their local caching.

The VCS File Attributes Implementation

The implementation speedups VCS status access for remote repositories. It caches last know repository state. The state is assumed to not change too often. Note that final state check reponsibility is on particular VCS command. It's by nature distributed system and no shared state information exists. E.g. cvs commit must fail if someone have commited the same file into repository 1ms before.

The implementaion has two high level goals:

The package fulfils several contracts. It defines FileProperties attribute descibing versioned file metadata. The attribute is integrated to NB filesystems world using Turbo class and TurboUtil utility class. Statuses class defines statuses assigned by turbo if original status cannot be retrieved. It covers unknown status used as fallback if no reliable status source exists.

Sibling IgnoreList class internaly parasites on FileProperties attribute. More clean approach is shown with RepositoryFiles class a courtesy to VCSFileSystem that supports virtual files. Both classes somehow utilizies information sharing, eliminating dedicated repository connections to address their highly specialized contracts.

Architectural Notes

FileObject Parameter

It works over FileSystem. It's expected that clients do not need to store FileProperties for non-FileObjects. E.g. it's safe to call findResource(path) in FileSystem implementation except children(), createData() and createFolder() methods.

There is a backdoor allowing to set the attribute for a File to catch these FileObject prenatal situations. VCSFileSystem should be the only client.

Two Layers

The implementation is a layer above FileAttributeQuery package. It implements and registers fallback FileAttributeProvider that can store FileProperties attribute.

Assertions and Tests

There are many asserts scattered all around the code guarding (un)documented assumptions.

Special test VCS testprofile is created. It has backdoor operations, programatically setting its state using XMLFS. It allows to simulate various situations.

Postmortem Debuggibility

The contract consists from methods without behaviour modification parameters. It uses a set of dedicated methods instead of a method taking a strategy constant (passed all around code). It allows to quickly analyze thread dumps (compare to invisible method parameters).

An exception exists here. A special care it taken to GUI thread, most methods assert if called from it, others speed up operation by returning intermidiate results (and firing an event later on). It does not complicate thread dump reading.

Status

IMPLEMENTED, INTEGRATION IN PROGRESS - porting original cache clients. Famous OOME sanity check passes. Status coherence NOT yet tested.

Existing client code contains new code paths guarded by Turbo.implemented() checks. These are not ready to be used right now. There are still missing following client code (filesystem and commands) conversions (it obviously excludes cache and caching packages):


 

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