FileStoreSpaceAttributeView#readAttributes("totalSpace") does not return totalSpace

Alan Bateman Alan.Bateman at Sun.COM
Thu Sep 4 04:27:20 PDT 2008


Rémi Forax wrote:
> You can use a marker intreface to force third party to implement it.
> Something like that:
>
> interface FileStoreSpaceAttributeKey<V> {
>  // marker interface
> }
> class FileStoreSpaceAttributeView {
>   V readAttributes(FileStoreSpaceAttributeKey<? extends V> key) {
>     ...
>  }
> }
>
> // in third party code
> public static final FileStoreSpaceAttributeKey<Integer> 
> NUMBER_OF_INODES=...
>
Let's explore this to see how it might work. If I read your mail 
correctly then the "third party" is the provider implementation and 
NUMBER_OF_INODES is defined by the provider. Assuming I have this right 
then the application would use the key and so would require the provider 
to be present at both compile time and runtime.

-Alan.




More information about the nio-dev mailing list