Class: Quark::MdkDiscovery::CircuitBreakerFactory

Inherits:
Object
  • Object
show all
Extended by:
DatawireQuarkCore::Static
Defined in:
lib/mdk_discovery.rb

Overview

Create CircuitBreaker instances.

Constant Summary

Constants included from DatawireQuarkCore::Static

DatawireQuarkCore::Static::Unassigned

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DatawireQuarkCore::Static

_lazy_statics, static, unlazy_statics

Constructor Details

#initialize(runtime) ⇒ CircuitBreakerFactory

Returns a new instance of CircuitBreakerFactory.



913
914
915
916
917
918
919
# File 'lib/mdk_discovery.rb', line 913

def initialize(runtime)
    
    super()
    (self).time = runtime.getTimeService()

    nil
end

Instance Attribute Details

#retestDelayObject

Returns the value of attribute retestDelay.



906
907
908
# File 'lib/mdk_discovery.rb', line 906

def retestDelay
  @retestDelay
end

#thresholdObject

Returns the value of attribute threshold.



906
907
908
# File 'lib/mdk_discovery.rb', line 906

def threshold
  @threshold
end

#timeObject

Returns the value of attribute time.



906
907
908
# File 'lib/mdk_discovery.rb', line 906

def time
  @time
end

Instance Method Details

#__init_fields__Object



969
970
971
972
973
974
975
976
977
# File 'lib/mdk_discovery.rb', line 969

def __init_fields__()
    
    super
    self.threshold = 3
    self.retestDelay = 30.0
    self.time = nil

    nil
end

#_getClassObject



931
932
933
934
935
936
# File 'lib/mdk_discovery.rb', line 931

def _getClass()
    
    return "mdk_discovery.CircuitBreakerFactory"

    nil
end

#_getField(name) ⇒ Object



938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
# File 'lib/mdk_discovery.rb', line 938

def _getField(name)
    
    if ((name) == ("threshold"))
        return (self).threshold
    end
    if ((name) == ("retestDelay"))
        return (self).retestDelay
    end
    if ((name) == ("time"))
        return (self).time
    end
    return nil

    nil
end

#_setField(name, value) ⇒ Object



954
955
956
957
958
959
960
961
962
963
964
965
966
967
# File 'lib/mdk_discovery.rb', line 954

def _setField(name, value)
    
    if ((name) == ("threshold"))
        (self).threshold = ::DatawireQuarkCore.cast(value) { ::Integer }
    end
    if ((name) == ("retestDelay"))
        (self).retestDelay = ::DatawireQuarkCore.cast(value) { ::Float }
    end
    if ((name) == ("time"))
        (self).time = ::DatawireQuarkCore.cast(value) { ::Quark.mdk_runtime.Time }
    end

    nil
end

#createObject



924
925
926
927
928
929
# File 'lib/mdk_discovery.rb', line 924

def create()
    
    return ::Quark.mdk_discovery.CircuitBreaker.new(@time, @threshold, @retestDelay)

    nil
end