-discovery tcp://127.0.0.1:50000 -member_name sharedall -capacity 2 -eviction_policy lru -security_token exdomain_token.txt
To invoke
ASOperations to work in conjunction with the ASPersistence example when it has been started with security, use the following command line options:
-discovery tcp://127.0.0.1:50000 -role seeder -persistence shared_all -capacity 2 -eviction_policy lru -security_token exdomain_token.txt
These command line options start
ASPersistence and
ASOperations using the default metaspace name ms and allow them to connect to a security domain controller that has been started using the example security policy file example_policy.txt. Using ASPersistence
Note: Because encrypted fields cannot be persisted with shared all persistence, you should not try to use the -encrypt_field command line option when starting ASPersistence or ASOperations for this scenario.
Use
ASOperations to put the following data into the space:
- any
- bat
- cat
Each time a put is done using
ASOperations, you will see the
onWrite method of the Persister interface invoked in the command window where the
ASPersistence example was started.
Since we have defined the space to have a capacity of 2 but we have put three entries into the space, the first entry will be evicted from the space. To verify this, enter
br at the command prompt displayed by the
ASOperations example and press
Enter when prompted for a filter. The last two entries put into the space should be displayed.
Now use
ASOperations to get the entry with an index of 1 back into the space. Enter
g for get in the command window of
ASOperations. Enter
1 for the key and press
Enter. You will see the
onRead method of the
Persister interface invoked in the
ASPersistence command window.