org.gridgain.visor.commands.cache

VisorCacheCommand

class VisorCacheCommand extends AnyRef

Overview

Visor 'cache' command implementation.

Help

+-----------------------------------------------------------------------------------------+
| cache          | Prints statistics about caches from specified node on the entire grid. |
|                | Output sorting can be specified in arguments.                          |
|                |                                                                        |
|                | Output abbreviations:                                                  |
|                |     #   Number of nodes.                                               |
|                |     H/h Number of cache hits.                                          |
|                |     M/m Number of cache misses.                                        |
|                |     R/r Number of cache reads.                                         |
|                |     W/w Number of cache writes.                                        |
+-----------------------------------------------------------------------------------------+
| cache -compact | Compacts all entries in cache on all nodes.                            |
+-----------------------------------------------------------------------------------------+
| cache -clear   | Clears all entries from cache on all nodes.                            |
+-----------------------------------------------------------------------------------------+
| cache -scan    | List all entries in cache with specified name.                         |
+-----------------------------------------------------------------------------------------+
Specification
cache
cache -i
cache {-c=<cache-name>} {-id=<node-id>|id8=<node-id8>} {-s=lr|lw|hi|mi|re|wr} {-a} {-r}
cache -clear {-c=<cache-name>}
cache -compact {-c=<cache-name>}
cache -scan -c=<cache-name> {-id=<node-id>|id8=<node-id8>} {-p=<page size>}
cache -swap {-c=<cache-name>} {-id=<node-id>|id8=<node-id8>}
Arguments
-id=<node-id>
    Full ID of the node to get cache statistics from.
    Either '-id8' or '-id' can be specified.
    If neither is specified statistics will be gathered from all nodes.
-id8=<node-id>
    ID8 of the node to get cache statistics from.
    Either '-id8' or '-id' can be specified.
    If neither is specified statistics will be gathered from all nodes.
-c=<cache-name>
    Name of the cache.
-s=lr|lw|hi|mi|re|wr|cn
    Defines sorting type. Sorted by:
       lr Last read.
       lw Last write.
       hi Hits.
       mi Misses.
       rd Reads.
       wr Writes.
    If not specified - default sorting is 'lr'.
-i
    Interactive mode.
    User can interactively select node for cache statistics.
-r
    Defines if sorting should be reversed.
    Can be specified only with '-s' argument.
-a
    Prints details statistics about each cache.
    By default only aggregated summary is printed.
-compact
     Compacts entries in cache.
-clear
     Clears cache.
-scan
     Prints list of all entries from cache.
-swap
     Swaps backup entries in cache.
-p=<page size>
    Number of object to fetch from cache at once.
    Valid range from 1 to 100.
    By default page size is 25.
Examples
cache
    Prints summary statistics about all caches.
cache -id8=12345678 -s=hi -r
    Prints summary statistics about caches from node with specified id8
    sorted by number of hits in reverse order.
cache -i
    Prints cache statistics for interactively selected node.
cache -s=hi -r -a
    Prints detailed statistics about all caches sorted by number of hits in reverse order.
cache -compact
    Compacts entries in interactively selected cache.
cache -compact -c=cache
    Compacts entries in cache with name 'cache'.
cache -clear
    Clears interactively selected cache.
cache -clear -c=cache
    Clears cache with name 'cache'.
cache -scan
    Prints list entries from interactively selected cache.
cache -scan -c=cache
    Prints list entries from cache with name 'cache' from all nodes with this cache.
cache -scan -c=@c0 -p=50
    Prints list entries from cache with name taken from 'c0' memory variable
    with page of 50 items from all nodes with this cache.
cache -scan -c=cache -id8=12345678
    Prints list entries from cache with name 'cache' and node '12345678' ID8.
cache -swap
    Swaps entries in interactively selected cache.
cache -swap -c=cache
    Swaps entries in cache with name 'cache'.
cache -swap -c=@c0
    Swaps entries in cache with name taken from 'c0' memory variable.
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. VisorCacheCommand
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new VisorCacheCommand()

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def askForCache(title: String, node: Option[GridNode]): Option[String]

    Asks user to select a cache from the list.

    Asks user to select a cache from the list.

    title

    Title displayed before the list of caches.

    returns

    Option for ID of selected cache.

  6. def cache(): Unit

    Prints unsorted statistics about all caches.

    Command

    Prints unsorted statistics about all caches.

    Examples

    <ex>cache</ex> Prints unsorted statistics about all caches.

  7. def cache(args: String): Unit

    Prints statistics about caches from nodes that pass mnemonic predicate.

    Command

    Prints statistics about caches from nodes that pass mnemonic predicate. Sorting can be specified in arguments.

    Examples

    <ex>cache -id8=12345678 -s=no -r</ex> Prints statistics about caches from node with specified id8 sorted by number of nodes in reverse order.
    <ex>cache -s=no -r</ex> Prints statistics about all caches sorted by number of nodes in reverse order.
    <ex>cache -compact</ex> Compacts entries in interactively selected cache.
    <ex>cache -compact -c=cache</ex> Compacts entries in cache with name 'cache'.
    <ex>cache -clear</ex> Clears interactively selected cache.
    <ex>cache -clear -c=cache</ex> Clears cache with name 'cache'.
    <ex>cache -scan</ex> Prints list entries from interactively selected cache.
    <ex>cache -scan -c=cache</ex> Prints list entries from cache with name 'cache' from all nodes with this cache.
    <ex>cache -scan -c=@c0 -p=50</ex> Prints list entries from cache with name taken from 'c0' memory variable with page of 50 items from all nodes with this cache.
    <ex>cache -scan -c=cache -id8=12345678</ex> Prints list entries from cache with name 'cache' and node '12345678' ID8.
    <ex>cache -swap</ex> Swaps entries in interactively selected cache.
    <ex>cache -swap -c=cache</ex> Swaps entries in cache with name 'cache'.
    <ex>cache -swap -c=@c0</ex> Swaps entries in cache with name taken from 'c0' memory variable.

    args

    Command arguments.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  19. def toString(): String

    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped