returns the total amount of items available for storage/processing. In some
scenarios, it might not be possible/convenient to actually retrieve this value
or it might not be available at this point. -1 is returned in such a case.
Closes the resource. Calling this method is mandatory for any component using
this instance once it finishes using it. This method should not throw
exception is invoked on an instance that has already been closed