24.5. Cache Administration

24.5.1. Adding a New Cache

To add a new cache, follow these steps:

Procedure 24.2. Adding a New Cache

  1. In the Cache Containers view, click on the name of the cache container.
    Description

    Figure 24.5. Cache Containers View

  2. The Caches view is displayed listing all the configured caches. Click Add Cache to add and configure a new cache. The new cache creation window is opened.
    Description

    Figure 24.6. Add Cache

  3. Enter the new cache name, select the base configuration template from the drop-down menu and click Next.
    Description

    Figure 24.7. Cache Properties

  4. The cache configuration screen is displayed. Enter the cache parameters and click Create.
    Description

    Figure 24.8. Cache Configuration

  5. A confirmation screen is displayed. Click Create to create the cache.
    Description

    Figure 24.9. Cache Confirmation

Result

New cache is added successfully.

24.5.2. Editing Cache Configuration

The JBoss Data Grid Administration Console allows administrators to edit the configuration of an existing cache.
The following procedure outlines the steps to edit a cache configuration:

Procedure 24.3. Editing Cache Configuration

  1. Log into the JBoss Data Grid Administration Console and click on the cache container name.
    Description

    Figure 24.10. Cache Containers

  2. In the Caches view, click on the cache name.
    Description

    Figure 24.11. Caches View

  3. The cache statistics and properties page is displayed. On the right hand side, click the Configuration tab.
    Description

    Figure 24.12. Cache Configuration Button

  4. The edit cache configuration interface is opened. The editable cache properties are found in the cache properties menu at the left hand side.
    Description

    Figure 24.13. Editing Cache Configuration Interface

  5. Select the cache configuration property to be edited from the cache properties menu. To get a description on the cache configuration parameters, hover the cursor over the information icon. The parameter description is presented in form of a tooltip.
    Description

    Figure 24.14. Cache configuration paramaters

  6. For example, the General property is selected by default. Edit the required values in the given parameter input field. Scroll down and click Apply changes.
  7. A confirmation dialog box will appear. Click Update.
    Description

    Figure 24.15. 

  8. The restart dialogue box appears. Click Restart Now to apply the changes.
    Description

    Figure 24.16. Restart Dialogue Box

    Note

    Click Restart Later to continue editing the cache properties.

24.5.3. Cache Statistics and Properties View

The JBoss Data Grid Administration Console allows administrators to view all the cache statistics including the average time for reads, average times for writes, total number of entries, total number of reads, total number of failed reads and total number of writes.
To view the cache statistics, follow these steps:

Procedure 24.4. Viewing Cache Statistics

  1. Navigate to the list of caches by clicking on the name of the cache container in the Cache Container view.
  2. Click on the name of the cache from the list of caches. Optionally you can use the cache filter on the left side to filter caches. The caches can be filtered by a keyword, substring or by selecting the type and the trait.
    Description

    Figure 24.17. Caches View

  3. The next page displays the comprehensive cache statistics under the headings: Cache content, Operations performance and Caching Activity.
    Description

    Figure 24.18. Cache Statistics

  4. Additional cache statistics are displayed under the headings: Entries Lifecycle, Cache Loader and Locking
    Description

    Figure 24.19. Cache Statistics

  5. To view cache properties, click on Configuration at the right hand side.
    Description

    Figure 24.20. Configuration Button

  6. The cache properties menu is displayed at the left hand side.
    Description

    Figure 24.21. Cache Properties Menu

To view on which node a cache resides, click on the Nodes tab next to the General Status tab on the cache statistics page.
Description

Figure 24.22. General Status Tab

The name of the Node(s) is displayed along with the read-write statistics.
Description

Figure 24.23. Cache Node Labels

24.5.4. Enable and Disable Cache

The following procedure outlines the steps to disable a cache:

Procedure 24.5. Disabling a Cache

  1. Navigate to the caches view by clicking on the name of the cache container in the Cache Container view. Click on the name of the cache to be disabled.
    Description

    Figure 24.24. Caches View

  2. The cache statistics will be displayed. On the right hand side of the interface, click on the Actions tab and then click Disable.
    Description

    Figure 24.25. Cache Disable

  3. A confirmation dialogue box will appear. Click Disable to disable the cache.
    Description

    Figure 24.26. Cache Disable Confirmation

  4. A subsequent dialogue box appears. Click Ok.
    Description

    Figure 24.27. Confirmation Box

  5. The selected cache is disabled successfully with a visual indicator Disabled next to the cache name label.
    Description

    Figure 24.28. Disabled Cache

Result

The cache is disabled successfully.

The following procedure outlines the steps to enable a cache:

Procedure 24.6. Enabling a Cache

  1. To enable a cache, click on the specific disabled cache from the Cache view.
    Description

    Figure 24.29. Caches View

  2. On the right hand side of the interface, click on the Actions tab.
    Description

    Figure 24.30. 

  3. From the Actions tab, click Enable
    Description

    Figure 24.31. Actions Menu

  4. A confirmation dialogue box appears. Click Enable.
    Description

    Figure 24.32. Confirmation Box

  5. A subsequent dialogue box appears. Click Ok
    Description

    Figure 24.33. Information Box

  6. The selected cache is enabled successfully with a visual indicator Enabled next to the cache name label.
    Description

    Figure 24.34. Cache Enabled

24.5.5. Cache Flush and Clear

The JBoss Data Grid Administration Console allows administrators to remove all the entries from a cache and the cache stores through the cache clear operation. The console also provides the Flush operation to store the entries from the cache memory to the cache store.

Flushing a Cache

To flush a cache, follow these steps:

Procedure 24.7. Flushing a Cache

  1. In the Cache Containers view, click on the name of the cache container.
  2. The Caches view is displayed. Click on the cache to be cleared.
    Description

    Figure 24.35. Caches View

  3. The cache statistics page is displayed. At the right hand side, click Actions.
    Description

    Figure 24.36. Actions Button

  4. From the Actions menu, click Flush.
    Description

    Figure 24.37. Actions Menu

  5. A confirmation dialogue box appears. Click Flush.
    Description

    Figure 24.38. Cache Flush Confirmation Box

  6. The cache is successfully flushed. Click Ok.
    Description

    Figure 24.39. Cache Flush Information Box

Clearing a Cache

To clear a cache, follow these steps:

Procedure 24.8. Clearing a Cache

  1. In the Cache Containers view, click on the name of the cache container.
  2. The Caches view is displayed. Click on the cache to be cleared.
    Description

    Figure 24.40. Caches View

  3. On the cache statistics page, at the right hand side, click Actions.
    Description

    Figure 24.41. 

  4. From the Actions menu, click Clear.
    Description

    Figure 24.42. Clear Button

  5. A confirmation dialogue box appears. Click Clear.
    Description

    Figure 24.43. Confirmation Box

  6. The cache is successfully flushed. Click Ok.
    Description

    Figure 24.44. Information Box

24.5.6. Server Tasks Execution

The JBoss Data Grid Administration Console allows administrators to start a server script job on the JBoss Data Grid cluster.

24.5.7. Server Tasks

24.5.7.1. New Server Task

The following procedure outlines the steps to launch a new server task:

Procedure 24.9. Launching a New Server Task

  1. In the Cache Containers view of the JBoss Data Grid Administration Console, click on the name of the Cache container.
  2. On the cache view page, click the Task Execution tab.
    Description

    Figure 24.45. Task Execution

  3. In the Tasks execution tab, click Launch new task.
    Description

    Figure 24.46. Launch New Task

  4. Enter the new task properties and click Launch task.
    Description

    Figure 24.47. Task Properties

Result

New server task is successfully created.

24.5.7.2. Server Tasks View

After the server task is launched, it can be viewed in the Task execution tab along with the other running tasks. The set of completed server script jobs with the start time and end time can be viewed. Additionally, number of successful executions and number of failed executions can also be viewed.
Description

Figure 24.48. Server Tasks View

Description

Figure 24.49. Task Start/End Time