Class List Method List File List

# Class: Vertx::SharedData

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

## Instance Method Summary (collapse)

- - (Object) get_cluster_wide_map(name = nil)
- - (Object) get_counter(name = nil)
- - (Object) get_local_map(name = nil)
- - (Object) get_lock(name = nil)
- - (Object) get_lock_with_timeout(name = nil, timeout = nil)
- - (SharedData) initialize(j_del) constructor
  A new instance of SharedData.
- - (Object) j_del

## Constructor Details

### - (`SharedData`) initialize(j_del)

Returns a new instance of SharedData

    22
    23
    24
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/shared_data.rb', line 22

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) get_cluster_wide_map(name = nil)

Raises:

- (`ArgumentError`)

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

    def get_cluster_wide_map(name=nil)
      if name.class == String && block_given?
        return @j_del.java_method(:getClusterWideMap, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::Vertx::AsyncMap) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling get_cluster_wide_map(name)"
    end

### - (`Object`) get_counter(name = nil)

Raises:

- (`ArgumentError`)

    67
    68
    69
    70
    71
    72
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/shared_data.rb', line 67

    def get_counter(name=nil)
      if name.class == String && block_given?
        return @j_del.java_method(:getCounter, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::Vertx::Counter) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling get_counter(name)"
    end

### - (`Object`) get_local_map(name = nil)

Raises:

- (`ArgumentError`)

    76
    77
    78
    79
    80
    81
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/shared_data.rb', line 76

    def get_local_map(name=nil)
      if name.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getLocalMap, [Java::java.lang.String.java_class]).call(name),::Vertx::LocalMap)
      end
      raise ArgumentError, "Invalid arguments when calling get_local_map(name)"
    end

### - (`Object`) get_lock(name = nil)

Raises:

- (`ArgumentError`)

    45
    46
    47
    48
    49
    50
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/shared_data.rb', line 45

    def get_lock(name=nil)
      if name.class == String && block_given?
        return @j_del.java_method(:getLock, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::Vertx::Lock) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling get_lock(name)"
    end

### - (`Object`) get_lock_with_timeout(name = nil, timeout = nil)

Raises:

- (`ArgumentError`)

    57
    58
    59
    60
    61
    62
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/shared_data.rb', line 57

    def get_lock_with_timeout(name=nil,timeout=nil)
      if name.class == String && timeout.class == Fixnum && block_given?
        return @j_del.java_method(:getLockWithTimeout, [Java::java.lang.String.java_class,Java::long.java_class,Java::IoVertxCore::Handler.java_class]).call(name,timeout,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::Vertx::Lock) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling get_lock_with_timeout(name,timeout)"
    end

### - (`Object`) j_del

    27
    28
    29
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/shared_data.rb', line 27

    def j_del
      @j_del
    end