Package com.hierynomus.smbj.connection
Class LeaseManager
java.lang.Object
com.hierynomus.smbj.connection.LeaseManager
- All Implemented Interfaces:
Closeable,AutoCloseable
Per-
Connection lease table. An inbound lease break carries no session/tree id,
so the table must live on the connection where any break can resolve a LeaseKey
to its LeaseEntry (spec 06). A directory's lease key is minted once per node
(path) and reused (Apple's per-node key); the path -> key map also lets a
child open thread its parent directory's own lease key.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddispatchBreak(SMB2LeaseBreakNotification notification) Entry point from the receive-thread break handler: dispatch the resolve/invalidate/ack work OFF the read thread.intNumber of lease breaks fully handled (test/diagnostic hook).The live lease entry forpath, ornullif none is registered.The lease key previously minted forpath, ornullif never opened.leaseKeyForPath(String path) Stable per-node key: mint once per normalized path, reuse thereafter.Resolve an inbound break's lease key to its entry (spec 06).voidregister(LeaseEntry entry) Register an entry BEFORE sending its CREATE (a break can race the grant response).voidunregister(LeaseKey key) Drop the entry (no lease granted / handle closed).
-
Constructor Details
-
LeaseManager
public LeaseManager()
-
-
Method Details
-
leaseKeyForPath
Stable per-node key: mint once per normalized path, reuse thereafter. -
leaseKeyForExistingPath
The lease key previously minted forpath, ornullif never opened. -
getByPath
The live lease entry forpath, ornullif none is registered. -
register
Register an entry BEFORE sending its CREATE (a break can race the grant response). -
lookup
Resolve an inbound break's lease key to its entry (spec 06). -
unregister
Drop the entry (no lease granted / handle closed). The node key inbyPathis kept. -
getBreaksHandled
public int getBreaksHandled()Number of lease breaks fully handled (test/diagnostic hook). -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
dispatchBreak
Entry point from the receive-thread break handler: dispatch the resolve/invalidate/ack work OFF the read thread.
-