Class List Method List File List

# Class: Vertx::AsyncMap

Inherits:
  Object
  - Object
  - Vertx::AsyncMap
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb

## Instance Method Summary (collapse)

- - (Object) clear
- - (Object) get(k = nil)
- - (AsyncMap) initialize(j_del) constructor
  A new instance of AsyncMap.
- - (Object) j_del
- - (Object) put(k = nil, v = nil, ttl = nil)
- - (Object) put_if_absent(k = nil, v = nil, ttl = nil)
- - (Object) remove(k = nil)
- - (Object) remove_if_present(k = nil, v = nil)
- - (Object) replace(k = nil, v = nil)
- - (Object) replace_if_present(k = nil, oldValue = nil, newValue = nil)
- - (Object) size

## Constructor Details

### - (`AsyncMap`) initialize(j_del)

Returns a new instance of AsyncMap

    9
    10
    11
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb', line 9

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) clear

Raises:

- (`ArgumentError`)

    104
    105
    106
    107
    108
    109
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb', line 104

    def clear
      if block_given?
        return @j_del.java_method(:clear, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling clear()"
    end

### - (`Object`) get(k = nil)

Raises:

- (`ArgumentError`)

    21
    22
    23
    24
    25
    26
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb', line 21

    def get(k=nil)
      if (k.class == String  || k.class == Hash || k.class == Array || k.class == NilClass || k.class == TrueClass || k.class == FalseClass || k.class == Fixnum || k.class == Float) && block_given?
        return @j_del.java_method(:get, [Java::java.lang.Object.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_object(k),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.from_object(ar.result) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling get(k)"
    end

### - (`Object`) j_del

    14
    15
    16
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb', line 14

    def j_del
      @j_del
    end

### - (`Object`) put(k = nil, v = nil, ttl = nil)

Raises:

- (`ArgumentError`)

    34
    35
    36
    37
    38
    39
    40
    41
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb', line 34

    def put(k=nil,v=nil,ttl=nil)
      if (k.class == String  || k.class == Hash || k.class == Array || k.class == NilClass || k.class == TrueClass || k.class == FalseClass || k.class == Fixnum || k.class == Float) && (v.class == String  || v.class == Hash || v.class == Array || v.class == NilClass || v.class == TrueClass || v.class == FalseClass || v.class == Fixnum || v.class == Float) && block_given? && ttl == nil
        return @j_del.java_method(:put, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_object(k),::Vertx::Util::Utils.to_object(v),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      elsif (k.class == String  || k.class == Hash || k.class == Array || k.class == NilClass || k.class == TrueClass || k.class == FalseClass || k.class == Fixnum || k.class == Float) && (v.class == String  || v.class == Hash || v.class == Array || v.class == NilClass || v.class == TrueClass || v.class == FalseClass || v.class == Fixnum || v.class == Float) && ttl.class == Fixnum && block_given?
        return @j_del.java_method(:put, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::long.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_object(k),::Vertx::Util::Utils.to_object(v),ttl,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling put(k,v,ttl)"
    end

### - (`Object`) put_if_absent(k = nil, v = nil, ttl = nil)

Raises:

- (`ArgumentError`)

    49
    50
    51
    52
    53
    54
    55
    56
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb', line 49

    def put_if_absent(k=nil,v=nil,ttl=nil)
      if (k.class == String  || k.class == Hash || k.class == Array || k.class == NilClass || k.class == TrueClass || k.class == FalseClass || k.class == Fixnum || k.class == Float) && (v.class == String  || v.class == Hash || v.class == Array || v.class == NilClass || v.class == TrueClass || v.class == FalseClass || v.class == Fixnum || v.class == Float) && block_given? && ttl == nil
        return @j_del.java_method(:putIfAbsent, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_object(k),::Vertx::Util::Utils.to_object(v),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.from_object(ar.result) : nil) }))
      elsif (k.class == String  || k.class == Hash || k.class == Array || k.class == NilClass || k.class == TrueClass || k.class == FalseClass || k.class == Fixnum || k.class == Float) && (v.class == String  || v.class == Hash || v.class == Array || v.class == NilClass || v.class == TrueClass || v.class == FalseClass || v.class == Fixnum || v.class == Float) && ttl.class == Fixnum && block_given?
        return @j_del.java_method(:putIfAbsent, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::long.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_object(k),::Vertx::Util::Utils.to_object(v),ttl,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.from_object(ar.result) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling put_if_absent(k,v,ttl)"
    end

### - (`Object`) remove(k = nil)

Raises:

- (`ArgumentError`)

    61
    62
    63
    64
    65
    66
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb', line 61

    def remove(k=nil)
      if (k.class == String  || k.class == Hash || k.class == Array || k.class == NilClass || k.class == TrueClass || k.class == FalseClass || k.class == Fixnum || k.class == Float) && block_given?
        return @j_del.java_method(:remove, [Java::java.lang.Object.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_object(k),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.from_object(ar.result) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling remove(k)"
    end

### - (`Object`) remove_if_present(k = nil, v = nil)

Raises:

- (`ArgumentError`)

    72
    73
    74
    75
    76
    77
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb', line 72

    def remove_if_present(k=nil,v=nil)
      if (k.class == String  || k.class == Hash || k.class == Array || k.class == NilClass || k.class == TrueClass || k.class == FalseClass || k.class == Fixnum || k.class == Float) && (v.class == String  || v.class == Hash || v.class == Array || v.class == NilClass || v.class == TrueClass || v.class == FalseClass || v.class == Fixnum || v.class == Float) && block_given?
        return @j_del.java_method(:removeIfPresent, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_object(k),::Vertx::Util::Utils.to_object(v),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling remove_if_present(k,v)"
    end

### - (`Object`) replace(k = nil, v = nil)

Raises:

- (`ArgumentError`)

    83
    84
    85
    86
    87
    88
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb', line 83

    def replace(k=nil,v=nil)
      if (k.class == String  || k.class == Hash || k.class == Array || k.class == NilClass || k.class == TrueClass || k.class == FalseClass || k.class == Fixnum || k.class == Float) && (v.class == String  || v.class == Hash || v.class == Array || v.class == NilClass || v.class == TrueClass || v.class == FalseClass || v.class == Fixnum || v.class == Float) && block_given?
        return @j_del.java_method(:replace, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_object(k),::Vertx::Util::Utils.to_object(v),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.from_object(ar.result) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling replace(k,v)"
    end

### - (`Object`) replace_if_present(k = nil, oldValue = nil, newValue = nil)

Raises:

- (`ArgumentError`)

    95
    96
    97
    98
    99
    100
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb', line 95

    def replace_if_present(k=nil,oldValue=nil,newValue=nil)
      if (k.class == String  || k.class == Hash || k.class == Array || k.class == NilClass || k.class == TrueClass || k.class == FalseClass || k.class == Fixnum || k.class == Float) && (oldValue.class == String  || oldValue.class == Hash || oldValue.class == Array || oldValue.class == NilClass || oldValue.class == TrueClass || oldValue.class == FalseClass || oldValue.class == Fixnum || oldValue.class == Float) && (newValue.class == String  || newValue.class == Hash || newValue.class == Array || newValue.class == NilClass || newValue.class == TrueClass || newValue.class == FalseClass || newValue.class == Fixnum || newValue.class == Float) && block_given?
        return @j_del.java_method(:replaceIfPresent, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_object(k),::Vertx::Util::Utils.to_object(oldValue),::Vertx::Util::Utils.to_object(newValue),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling replace_if_present(k,oldValue,newValue)"
    end

### - (`Object`) size

Raises:

- (`ArgumentError`)

    113
    114
    115
    116
    117
    118
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/async_map.rb', line 113

    def size
      if block_given?
        return @j_del.java_method(:size, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling size()"
    end