Package com.hierynomus.smbj.connection
Class LeaseEntry
java.lang.Object
com.hierynomus.smbj.connection.LeaseEntry
Client-side state for one directory lease. Registered in the
LeaseManager
before the CREATE is sent (a break can race the grant response), then updated
with the server-granted state once the response arrives. The receive thread (lease-break
handler) and the caller thread both touch the mutable fields, hence volatile.-
Constructor Summary
ConstructorsConstructorDescriptionLeaseEntry(LeaseKey leaseKey, LeaseKey parentLeaseKey, long requestedState, String path) -
Method Summary
Modifier and TypeMethodDescriptiongetCache()intintgetEpoch()longgetPath()longlongintEvict the cached enumeration tied to this lease and bump the generation (break/downgrade hook).booleanisBroken()booleanvoidsetBroken(boolean broken) voidsetCacheDirectory(Directory cacheDirectory) voidsetEpoch(int epoch) voidsetFileId(SMB2FileId fileId) voidsetGranted(boolean granted) voidsetGrantedState(long grantedState) voidsetOwner(Session session, long treeId, SMB2Dialect dialect) Record the open's owning session/tree/dialect so a break can be acknowledged.
-
Constructor Details
-
LeaseEntry
-
-
Method Details
-
getLeaseKey
-
getParentLeaseKey
-
getRequestedState
public long getRequestedState() -
getPath
-
getGrantedState
public long getGrantedState() -
setGrantedState
public void setGrantedState(long grantedState) -
getEpoch
public int getEpoch() -
setEpoch
public void setEpoch(int epoch) -
getFileId
-
setFileId
-
isGranted
public boolean isGranted() -
setGranted
public void setGranted(boolean granted) -
isBroken
public boolean isBroken() -
setBroken
public void setBroken(boolean broken) -
getSession
-
getTreeId
public long getTreeId() -
getDialect
-
setOwner
Record the open's owning session/tree/dialect so a break can be acknowledged. -
getCacheGeneration
public int getCacheGeneration() -
getCache
-
getCacheDirectory
-
invalidateCache
public int invalidateCache()Evict the cached enumeration tied to this lease and bump the generation (break/downgrade hook). Also closes and nulls the kept-open cache-enumeration handle so the server can reclaim it.
-