Supported Libraries
Supported Operations
Operations | Method Supported |
---|
Insert | spymemcached 2.7.1 - net.spy.memcached.MemcachedClient.set
- net.spy.memcached.MemcachedClient.add
|
Update | spymemcached 2.7.1 - net.spy.memcached.MemcachedClient.incr
- net.spy.memcached.MemcachedClient.asyncIncr
- net.spy.memcached.MemcachedClient.decr
- net.spy.memcached.MemcachedClient.asyncDecr
- net.spy.memcached.MemcachedClient.replace
- net.spy.memcached.MemcachedClient.append
- net.spy.memcached.MemcachedClient.prepend
- net.spy.memcached.MemcachedClient.getAndLock
- net.spy.memcached.MemcachedClient.getAndTouch
- net.spy.memcached.MemcachedClient.asyncGetAndTouch
- net.spy.memcached.MemcachedClient.asyncGetAndLock
|
Select | |
Delete | spymemcached 2.7.1 - net.spy.memcached.MemcachedClient.delete
|
Objects
Icon | Description |
---|
| Java Memcached Connection |
| |
| Java Unknown Memcached Connection |
| Java Unknown Memcached Data |
Links
Links are created for transaction and function point needs:
Link type | Source and destination of link | Methods Supported |
---|
belongsTo | From Memcached data object to Memcached connection object |
|
useInsertLink | Between the java Method objects and Memcached data object | |
useUpdateLink | - Increment
- Decrement
- Append
- Prepend
- CAS
- asyncCAS
- getAndLock
- getAndTouch
- asyncGetAndTouch
- asyncGetAndLock
|
useSelectLink | - Get
- GetAsync
- getBulk
- asyncGetBulk
- CAS
- asyncCAS
- getAndLock
- getAndTouch
- asyncGetAndTouch
- asyncGetAndLock
|
useDeleteLink | |
What results can you expect?
Once the analysis/snapshot generation is completed, you can view the results in the normal manner (for example via CAST Enlighten). Some examples are shown below.
Memcached Connection
.
Connection Creation - IP Address
In the Memcached class file, when we add the server information by parsing the IP address and provide the port Number. Below is a sample source code with its result in Enlighten
public class Connection {
public static void main(String[] args) throws IOException {
MemcachedClient mcc = new MemcachedClient(new InetSocketAddress("127.0.0.1", 11211));
}
}

Connection Creation - HostName
In the Memcached class file, when we add the set of server information by parsing the server address and provide the port Number over the binary connection protocol. Below is a sample source code with its result in Enlighten
public class Connection {
public static void main(String[] args) throws IOException {
MemcachedClient mcc1 = new MemcachedClient(new BinaryConnectionFactory(), AddrUtil.getAddresses
("server1"));
}
}

Unknown Connection Creation
Unknown Connection Object: In the Memcached class file, when we pass the server information as a parameter but if passed parameter are unresolved. Below is a sample source code with its result in Enlighten :
public class Connection {
public static void main(String[] args) throws IOException {
InetSocketAddress inet2 = new InetSocketAddress(Connection1.var, 11211);
MemcachedClient mcc = new MemcachedClient(inet2);
}
}

CRUD Operations
Insert Operation
set command
mcc.set("tp", 900, "memcached").isDone()

add command
mcc.add("data3", 900, "redis").isDone()

Select Operation
getBulk and asyncGetBulk
m = mcc1.getBulk(keySet);
vals = mcc1.asyncGetBulk(keySet);

Delete Operation
delete command
mcc.delete("data1").isDone()

Update Operation
replace command
mcc.replace("tp", 900, "redis").isDone()

append and prepend
mcc.append(900, "tp", "redis").isDone();
mcc.prepend(900, "tp", "redis").isDone();

Increment
// incrementing the numeric value of existing key
mcc.incr("tp", 2));
mcc.asyncIncr("tp", 2);

Decrement
//decrementing the numeric value of existing key
mcc.decr("tp", 1));
mcc.asyncDecr("tp", 1);
