Package org.firebirdsql.gds.ng
Class CachedInfoResponse
- java.lang.Object
- 
- org.firebirdsql.gds.ng.CachedInfoResponse
 
- 
 public class CachedInfoResponse extends java.lang.ObjectCached info response.This class holds an info response array, and can produce a filtered response holding only those items asked for. - Since:
- 5.0.8
- Author:
- Mark Rotteveel
 
- 
- 
Constructor SummaryConstructors Constructor Description CachedInfoResponse(byte[] infoResponse)Constructs a cached info response.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CachedInfoResponseempty()booleanequals(java.lang.Object obj)byte[]filtered(byte[] requestItems)Produces a response with only the items inrequestItems, allowing items to be missing.java.util.Optional<byte[]>filteredComplete(byte[] requestItems)Produces a response with only the items inrequestItems, requiring all items to be present.inthashCode()byte[]infoResponse()
 
- 
- 
- 
Method Detail- 
emptypublic static CachedInfoResponse empty() - Returns:
- a — possibly cached — empty cached info response
 
 - 
filteredpublic byte[] filtered(byte[] requestItems) Produces a response with only the items inrequestItems, allowing items to be missing.If there are no matching items, or the cached response is empty, then a byte array with only ISCConstants.isc_info_endis returned.- Parameters:
- requestItems- requested info items
- Returns:
- an info response with only the requested items, ending in
 ISCConstants.isc_info_end
- See Also:
- filteredComplete(byte[])
 
 - 
filteredCompletepublic java.util.Optional<byte[]> filteredComplete(byte[] requestItems) Produces a response with only the items inrequestItems, requiring all items to be present.If at least one item in requestItems(excludingISCConstants.isc_info_end) is not found in this cached info response, empty is returned.- Parameters:
- requestItems- requested info items
- Returns:
- an optional with an info response with only the requested items, and ending in
 ISCConstants.isc_info_end, or empty if at least one of the requested items where not found in the cached response, or if the cached response is empty
- See Also:
- filtered(byte[])
 
 - 
infoResponsepublic byte[] infoResponse() - Returns:
- a copy of the full info response array
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 
- 
 
-