public class NetworkFileCache
extends java.lang.Object
Caches the network files that are currently being accessed by the NFS server.
Modifier and Type | Class and Description |
---|---|
protected class |
NetworkFileCache.FileEntry
File Entry Class
|
protected class |
NetworkFileCache.FileExpiry
File Expiry Thread Class
|
Modifier and Type | Field and Description |
---|---|
static long |
ClosedFileTimeout |
static long |
DefaultFileTimeout |
Constructor and Description |
---|
NetworkFileCache(java.lang.String name)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addFile(NetworkFile file,
TreeConnection conn,
NFSSrvSession sess)
Add a file to the cache
|
void |
closeAllFiles()
Close the expiry cache, close and remove all files from the cache and
stop the expiry thread.
|
void |
dumpCache()
Dump the cache entries to the debug device
|
NetworkFile |
findFile(int id,
SrvSession sess)
Find a file via the file id
|
boolean |
hasDebug()
Determine if debug output is enabled
|
int |
numberOfEntries()
Return the count of entries in the cache
|
void |
removeFile(int id)
Remove a file from the cache
|
void |
setCloseTimer(long closeTimer)
Set the close file cache timer value
|
void |
setDebug(boolean ena)
Enable/disable debug output
|
void |
setIOTimer(long ioTimer)
Set the I/O cache timer value
|
void |
setRpcAuthenticator(RpcAuthenticator auth)
Set the RPC authenticator
|
public static final long DefaultFileTimeout
public static final long ClosedFileTimeout
public NetworkFileCache(java.lang.String name)
name
- Stringpublic final boolean hasDebug()
public final void addFile(NetworkFile file, TreeConnection conn, NFSSrvSession sess)
file
- NetworkFileconn
- TreeConnectionsess
- NFSSrvSessionpublic final void removeFile(int id)
id
- public final NetworkFile findFile(int id, SrvSession sess)
id
- intsess
- SrvSessionpublic final int numberOfEntries()
public final void closeAllFiles()
public final void setDebug(boolean ena)
ena
- booleanpublic final void setIOTimer(long ioTimer)
ioTimer
- longpublic final void setCloseTimer(long closeTimer)
closeTimer
- longpublic final void setRpcAuthenticator(RpcAuthenticator auth)
auth
- RpcAuthenticatorpublic final void dumpCache()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.