Class: Aws::EndpointCache::Endpoint Private
- Inherits:
-
Object
- Object
- Aws::EndpointCache::Endpoint
- Defined in:
- lib/aws-sdk-core/endpoint_cache.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- CACHE_PERIOD =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
default endpoint cache time, 1 minute
1
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
private
- String
-
valid URI address (with path).
Instance Method Summary collapse
- #expired? ⇒ Boolean private
-
#initialize(options) ⇒ Endpoint
constructor
private
A new instance of Endpoint.
Constructor Details
#initialize(options) ⇒ Endpoint
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Endpoint.
177 178 179 180 181 |
# File 'lib/aws-sdk-core/endpoint_cache.rb', line 177 def initialize() @address = .fetch(:address) @cache_period = [:cache_period_in_minutes] || CACHE_PERIOD @created_time = Time.now end |
Instance Attribute Details
#address ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
- String
-
valid URI address (with path)
184 185 186 |
# File 'lib/aws-sdk-core/endpoint_cache.rb', line 184 def address @address end |
Instance Method Details
#expired? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
186 187 188 |
# File 'lib/aws-sdk-core/endpoint_cache.rb', line 186 def expired? Time.now - @created_time > @cache_period * 60 end |