Interface StatefulResource
- All Known Implementing Classes:
FileInfo
public interface StatefulResource
An interface for objects that represent a stateful resource in the conversation context.
Implementing this interface allows the ResourceTracker to identify,
monitor, and manage the lifecycle of the resource (e.g., a local file).
This provides a compile-time safe contract for resource identification and staleness detection.
- Author:
- Anahata
-
Method Summary
Modifier and TypeMethodDescriptionlongGets the last modified timestamp of the resource.Gets the unique identifier for this resource.longgetSize()Gets the size of the resource in bytes.
-
Method Details
-
getResourceId
String getResourceId()Gets the unique identifier for this resource.For files, this is typically the absolute path. For other resources, it could be a URL, a database ID, or any other unique string.
- Returns:
- The unique, non-null identifier for the resource.
-
getLastModified
long getLastModified()Gets the last modified timestamp of the resource.- Returns:
- The last modified time in milliseconds since the epoch.
-
getSize
long getSize()Gets the size of the resource in bytes.- Returns:
- The size in bytes.
-
